Results 1 to 2 of 2
  1. #1
    New Lounger
    Join Date
    Nov 2012
    Thanked 0 Times in 0 Posts

    Add New Record with Related Tables (Access 2003)

    Hope this makes 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?

  2. #2
    Platinum Lounger
    Join Date
    Dec 2001
    Melbourne, Australia
    Thanked 32 Times in 32 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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts