multy data entery

ariansman

Registered User.
Local time
Today, 13:51
Joined
Apr 3, 2012
Messages
157
On a form there are some comboboxes and textboxes. They receive their data from other tables. For example table1 and table2.


[FONT=&quot]I would like to push the record button and insert the data from combobox1 in to table3, Textbox1 to table4 and textbox2 into both table3 and table4. How can I design this action?[/FONT]
 
Unless Table1 and Table2 are simply being used as Lookup Tables, i.e. to hold something such as the names of Salesmen, to facilitate the entering of this info in a sales record, storing identical data in multiple Tables is generally a very bad idea.

Perhaps you could give us a plain-English explanation of what you're trying to do, here.

Linq ;0)>
 
Perhaps you could give us a plain-English explanation of what you're trying to do, here.
Linq ;0)>

There are two separate tables: Expense and Income tables. Each record the Employee ID, date and amount of the expense or income. Employee ID is a foreign key, looked up from Employee table.
Lets forget about some simple ways such as making two different forms to insert expenses and incomes. I am thinking if it is possible to make this task by one form.
In this proposed form, there is a comobobox for employeeID and three textboxes to show date, expense amount and income amount. To make it simple, we suppose that both the expense and income are recorded at the same date, however this is not so realistic.
By pushing the record button, we want “employee id” and “date” to be recorded in both “Expense table” and “Income table”. However expense amount and income amount are recorded in “Expense table” and “Income table” respectively.
 
i found the solution somewhere else,
i should use "ïnsert" function
 
You could probably keep income and expense in the same table. They are simply + and - views of actions.

Alternatively, if you elect to keep the two separate tables, why do you think it would be easier to write code to manage an unbound form than to have two bound subforms that don't require any extra code? In any case, you would need edit code to ensure that the data is correct. But with the bound form solution you don't need to manage populating controls and inserting/updating records yourself.
 

Users who are viewing this thread

Back
Top Bottom