Sync 2 subforms on my mainform

  • Thread starter Neal V via AccessMonster.com
  • Start date
N

Neal V via AccessMonster.com

I need help in getting two subforms on my mainform to sync up. When I click
on my combo box on my main form to select a vendor it populates the companyid
and name as follows:

Private Sub Combo170_AfterUpdate()
Me!TxtCompanyid = Me!Combo170.Column(1)
Me!CompanyName = Me!Combo170.Column(0)
End Sub

Once the company name and companyid is populated, subform1 is automatically
populated with checklist fields related to that company and companyid. When
I chose another company name in the combobox a different set of checklists
appear in Subform1 which is a continuous form. Here is my link to subform1
which works just fine:

LinkMaster = txtcompanyid
LinkChild = txtcompanyid

At last is my problem with subform2. Whenever subform1 is populated with
the checklist, I need fields “yes/No” checkbox to prefill subform2 with “no”
being the default. If subform1 has 5 checklists, then subform2 should
prefill with 5 “No”. If subform1 has 12 checklist, then subform2 should
prefill with 12 “No” fields and they must be updateable. This way when
subform1 prefills the user can update the record with Yes or No in subform2
next to each checklist item in subform1. They need to indicate if the item
has been received with a yes or no. Here’s a sample look of how the two
subforms should look:

Subform1 Subform2
Dd1 No
Dd3 No
Nchecklist No
AN345 No

Subform1 can change to have any number of checklists. I need subform2 to
populate with the same number of “no’ as default which is updatable.

When the record is saved, the data from subform1 and subform2 will be saved
to an “Event table” tied or linked to companyid and JO# from the mainform.
So, in this event table the example of the subforms above can exist many
times. What makes them unique is the JO# from the mainform.

I hope someone can help me with this.

Thanks,
Neal
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top