Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    May 2001
    Location
    indiana
    Posts
    130
    Thanks
    0
    Thanked 0 Times in 0 Posts

    add new record in another form

    i have one form that i have information that the user enters in. i would like to take bits and pieces of this information and enter it into different tables...
    let me explain:
    i have a main form with EmpID, EmpDept, and BldgNo (and several others, but these will do to keep it simple). i also have two tables: one with EmpID and EmpDept, as well as one with EmpID and BldgNo. these two tables are for linking purposes. how can i input the info on the main form to the corresponding fields (as new records) in the two other tables?
    thanks for any help

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: add new record in another form

    Two options:

    1) build recordsets in code based on each of the table you want to write to and use the .AddNew method (DAO) to populate the appropriate fields

    2) call a saved query and pass it parameters or create SQL in code and execute it to write the records.
    Charlotte

  3. #3
    2 Star Lounger
    Join Date
    May 2001
    Location
    indiana
    Posts
    130
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: add new record in another form

    thanks charlotte
    what i have tried, and it looks like it might work is:
    when i hit the OK button on the main form, it opens each of the other forms (which are data-entry for each of the tables) with visible set to NO, and enters the data, then closes the form and goes to the next one. seems to work pretty well. thanks for your time

Posting Permissions

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