Page 2 of 2 FirstFirst 12
Results 16 to 23 of 23
  1. #16
    alukacs is offline Novice
    Windows XP Access 2010 64bit
    Join Date
    Feb 2012
    Posts
    12
    JZ, still at this one. Could you please tell me how to "Drag and Drop the forms as stated below"? To automatically link the two so when you add a new record to the main form and then move to the subform the data will be linked.

    Thanks, Alex

    It is best to set up the relationships first, then Access will automatically link a main form to any subforms which would be the best approach for what you are doing. You would base the main form on the customer table. You would then create another form based on the job table. You would then drag & drop the job form into the customer form. Access will automatically link the two so when you add a new record to the main form and then move to the subform the data will be linked.

  2. #17
    jzwp11 is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2010
    Location
    Dayton, OH
    Posts
    2,901
    Open your main form (I assume the one based on the customer table) in design view. In the navigation pane, find the form you created based on the jobs table (I assume again). Click on that form in the navigation pane and drag it into the detail section of the customer form you have open.

  3. #18
    alukacs is offline Novice
    Windows XP Access 2010 64bit
    Join Date
    Feb 2012
    Posts
    12
    JZ, thanks again for all the help. I am nearing the end of this project "I hope" for now. I have my 2 tables created "Customer Info and Job Specific", and their 2 respective Forms. The Relationship has been set "with no errors". I can create a new customer and enter a job for that customer. My only issue/question is on the Job Specific Form, when I go to add a new job, should the Customer ID field automatically be getting populated? Right now it is not???

    Thanks, Alex

  4. #19
    jzwp11 is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2010
    Location
    Dayton, OH
    Posts
    2,901
    when I go to add a new job, should the Customer ID field automatically be getting populated?
    Yes, it should if you have set up everything correctly. If you want me to take a look at it, run the compact and repair utility from the Access tools menu and then zip and post the database. Make sure to remove any sensitive information.

  5. #20
    alukacs is offline Novice
    Windows XP Access 2010 64bit
    Join Date
    Feb 2012
    Posts
    12

    Copy of DB

    JZ, thanks for taking a look. My plan is to getting things working properly and then go back and clean up the fields and command buttons... etc. I realize that this is not the best DB design......

    Alex

  6. #21
    jzwp11 is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2010
    Location
    Dayton, OH
    Posts
    2,901
    If you were using a form/subform design Access would have linked the form and subform, but you are using a separate form. With that approach you have to pass the customerID from the first form to the respective control in the second form.

    Since I do not use macros, I converted your macro to VBA code and made the necessary changes to the code behind the button. The revised DB is attached.

    I see that you did not take my advice for the table redesign. Based on my experience, this will cause a lot of problems for you in the long run, but it is your call.

  7. #22
    alukacs is offline Novice
    Windows XP Access 2010 64bit
    Join Date
    Feb 2012
    Posts
    12
    JZ, I do plan on making some more modifications to the tables. I just want to get past this obstacle. Getting burned out now...

    Thanks again for all the advice and help.
    Alex

  8. #23
    jzwp11 is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2010
    Location
    Dayton, OH
    Posts
    2,901
    The problem is that if you change your tables, your forms will not work correctly, that is why it is critical to get the table structure set up properly first.

Page 2 of 2 FirstFirst 12
Please reply to this thread with any new information or opinions.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums