I want to create a text box on a form that will update two different fields from different tables simultaneously how ?
Namely, How can I set the controlsource on the Properties of the textbox for two different fields ??
I want to create a text box on a form that will update two different fields from different tables simultaneously how ?
Namely, How can I set the controlsource on the Properties of the textbox for two different fields ??
You can't. The ControlSource can be bound to only one field of the RecordSource. You can use VBA code to change the RecordSource property. Or use an unbound textbox and use VBA to save value to appropriate field.
Why do you even need to do this?
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
You can't! You'd have to use an Append or Update Query to assign it to the second Table...and this smacks of a non-normalized app...and you're talking about storing one bit of data in two different Tables! This is only considered acceptable if the Field is being used as a Primary Key/Foreign Key, to link two Tables together.
Perhaps you'd better give us a more in-depth explanation of what you're doing, here.
Linq ;0)>
tnx.
I have one form that I linked to two tables by a query, one table for customers and another table for sales. the Form has one tab for filling customer data and another tab to fill sales data
Both tables have a field called "Social Security Number" which I want to connect by it the relationship between the tables
so when I fill the number in the form i want it to enter to both tables at the same time
Then you need to scrap your Query and set up a Main Form/Subform scenario, with the SSN as the linking Field.
For this kind of thing you'd typically have 2 Tables, as you already have, with Fields similar to this:
CustomerTable
SSN(Primary Key)
Customer
Address
City
State
Zip
SalesTable
SalesID (Primary Key)
SSN (as Foreign Key)
ItemName
UnitCost
Purchase Date
You'd have data from the CustomerTable as the RecordSet for a Main Form.
Data from the SalesTable as the RecordSet for a SalesForm, which would be set as a Subform to Main Form. (Linked by the SSN Fields)
There's no need for you to save the SSN to both Tables, as the Access Gnomes will place this in the SalesTable, automatically, since it is the Linking Field between Main Form/Subform.
Linq ;0)>
Here is reference on building form/subform http://office.microsoft.com/en-us/ac...010098674.aspx
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
hey, thanks for answers..
i will try to build it in the form/subform...
hope it would give me the right one..