Unanswered: Help creating a tabbed form to step through 4 related tables
Hopefully someone can help me with a tabbed form.
Here is what I have……four tables (customer, site, job, and job items) a customer has many sites, a site has many jobs, and a job has many job items. All tables are in a one-to-many relationship.
Here is what I want to happen…..build a tabbed form were tab one you can select or enter customer data, then click on tab two and enter/update site information for the related customer, then on tab three enter/update job information for that site, and finally on tab four I want to enter/update the job items related to the job. Basically, what I’m trying to do is use the tabbed form to step through four related tables.
Any suggestions on how I might go about doing this. I tried creating a query with the four tables and using that on the tabbed form but it only allows me to view data not enter it.
Tabs are just a way of showing lots of fields on the same form (think paging down). This is not the right approach for what you want to do.
I would approach this using three form/subforms:
If you get them working independantly you can then think about a bit of code to go for one form/subform to the next e.g. selecting one of the sites on the Customer/Site form opens the Site/job form for that site.
Sort of agree with Chris but, in more detail, to get it working you will need a sub-form on each tab. Each sub-form will be backed by a query which looks at the previous tab to see what the user selected.
Consequently when a user changes a value on one tab (e.g. customer on the first tab) you will need to trigger an event to re-query the sub-form on the next tab.