Autonumbering in forms in Access - forms

I have a form in access that saves the data in a database and I want one of the fields to be automatically calculated as the next value in line as the ID so that the user doesnt write the ID. does anyone have any ideas?

Create your table using an Autonumber data type.

If you manually create your tables then this statement
CREATE TABLE TableThatIncrements
(
Id AUTOINCREMENT(1001,1)
)
Alternately you can edit your existing table Id column using:
ALTER TABLE TableThatIncrements
ALTER COLUMN Id AUTOINCREMENT(1001,1)
If you do not, then you can change per the article I mentioned via the GUI interface. See steps in this article: https://superuser.com/questions/288087/how-do-i-set-the-first-value-of-autonumber-in-access
You can run a query in Access by doing the following:
Go to the "Create" tab and click "Query Design"
Just close the window that appears which asks you to select tables, we don't need that.
Go to the "Design" tab and click the button with the arrow until you get a textual input screen. (By default, it says SELECT;).
Delete the default text and paste the above query.
Click "Run".

Related

Make column editiable in pgadmin4

How to unlock the fields in pgadmin4 so I can insert/update column directly threw pgadmin4 Data Output result.
Please refer below image displaying lock icon in each field
I want result like below which has icon of a pencil which shows that the field is editable.
I have given all the permission on the table.
Give your table a primary key column. Otherwise, pgAdmin4 has no way to communicate to the database which row you are trying to edit.
We have to make sure we have selected the primary key at tables properties level (right click on your table).
You can do that inside table properties column section:
It happens if I do a join with me, try seperately running the queries without joins for the columns that you want to edit.

How to know in Talend if tMySQLInput will overwrite data?

I have one already existing Talend Open Studio tMySQLInput component with some sql code inside it, in order to retrieve some joined columns linked to a tMySQLOuput component (pointing to an already existing MySQL table) with few records.
QUESTION:
Will the "tMySQLInput" component overwrite the already existing table data that the tMySQLOutput component relates to? I mean is there an option to check in the tMySQLInput our output in order to say, overwrite each time this job is executed ?
Thank you all.
Yes, there is an option where in tMySQLOutput where you can specify what action you want to do to your table. Follow following steps:
Go to component tab of tMySQLOutput, it will open the basic settings of this component.
If you will look closer you will find Action on table. This is the action which you can perform on the table which is pointed by tMySQLOutput. It has options as Default, Drop and Create Table etc.
Then you have Action on data. These are the options which you can perform on the data like Insert, Update etc.
In your case I suppose you can choose Action on Table as Default and Action on Data as Insert. Default action would not do anything on the table and Insert option would insert the records at the end of table. But in case of Insert if you will have duplicate rows then job would stop the moment it will find any duplicate row.

Access Select specific tables to update, change and modify

I create a DB where each table is a different project.
However, i am not sure how i would go about creating a form in which a user can choose a specific table (project) from a drop down menu and than be able to update/edit/modify the contents in the table.
Each table is standardized to contain exact column headers.
Thanks in advance for you help.

Some fields are missing in the fieldexplorer. How to show all fields?

i'm using Crystal Reports with my ERP-System. There have been predefined reports i now want to change.
In the field-explorer are some tables which have been renamed for better readability. But those tables are missing some fields, i want to use. If i connect the whole table again, all fields are there. Is there a way to display all fields in the predefined tables.
I tried to refresh the Database but nothing changes. If i delete the predefined table and then rename the new one to the old one, so i can use all predefinded formulas, all used fields in the report get deleted. I would need to recreate the whole report then.
Thanks for the help
If it is truly the same table and is not showing all the fields then you need to do "Database > Verify Database". That will force CR to refresh the structure of the table (instead of just the data). If this doesn't add the missing fields then the table in the report is actually a different object.
To see what the table/view the report is actually using go to "Database > Set DataSource Location" and look at the properties node for that table. It will show if it is a table/view/SP and what the true object name is.
If you want to replace the existing table with a different table you go to "Database > Set DataSource Location" again. Highlight the existing table in the top window, connect and highlight the replacement table in the bottom window. Then click update. Crystal will replace one table with the other and all of the fields in the report that exist in the new table will be mapped automatically. Note that the new table will keep the alias of the original table. If you are unsure if the table was updated you can look at the properties node in the top window to see the change.

Insert new record to table without using portal

How can I insert a new record to another table that is related to the field im currently inputting data into without using a portal? Say that it is a dropdown button that has a value list from another table, but the record Im going to enter is not yet in that table so I am just going to type it. If it is a new record then it should be added to the other table for future use.
One technique is to create a script to do the record addition. You can then use a script trigger on the field or a button to call the script.
For example, let's assume that you have an Invoices table and a Line Items table, which is linked by this relationship:
Invoices::ID -----< LineItems::InvoiceID
You could create a script Make Line Item For Invoice ( InvoiceID ), and pass the Invoice::ID value as a script parameter.
The Make Line Item For Invoice ( InvoiceID ) might look something like this:
New Window [Name: "Create Line Item"]
Go to Layout ["Line Item Layout"]
New Record/Request
Set Field [LineItems::InvoiceID; Get ( ScriptParameter )]
Close Window [Name: "Create Line Item"; Current file]
It wouldn't be to hard, once you've got that working, to modify the script to take additional parameters and use them to set multiple fields in the new record.
You can fake it by making a very small portal (i.e. make it 1x1 pixel),
Then you can use the portal way: give to portal an object name, then when you want to add the record make Go to object [portal name], then Go to portal row with Last set and just put in the value (just make sure you have the Add option checked in the relationship)