Results 1 to 2 of 2
2012-11-18, 09:44 #1
- Join Date
- Nov 2012
- Thanked 0 Times in 0 Posts
Add New Record with Related Tables (Access 2003)
Hope this makes sense...an example might be clearer:
Say I had two tables (Table1 and Table2) where Table1 (having two columns) has Days of the week listed and a DaysID for each of those days.
Then a related Table2 has a Days column which lists the corresponding DaysID for a given day.
Then, in a textbox, on a Form, the DaysID from Table2 displays the actual day of the week.
All good so far.
When adding a new record and a day of the week is entered into a textbox how do I then convert what's been entered back to its corresponding and unique DaysID in Table2?
At the moment, when adding a new record, whatever gets written into the textbox is added to Table1, hence creating a new and unique DaysID, and that new ID then also gets added to the second table.
Nothing needs to be written to Table1. All that is needed is to identify the corresponding DaysID and save that to Table2. How do I do that?
2012-11-18, 15:38 #2
- Join Date
- Dec 2001
- Melbourne, Australia
- Thanked 27 Times in 27 Posts
For a start base the form on Table2. Then add a combo box on the form that has it's control name as DaysID, base the combo box on table 1 which shows DaysID (column width = zero) and Days of the Week (sorted ascending on this). Excuse the lack of c/r here as my carriage return does not seem to work in IE (in here) under Windows 8.