Form-subform-subform problem

GrandmasterB

New member
Local time
Today, 06:59
Joined
Jan 26, 2009
Messages
9
Hello all, I've got a small problem with multiple subforms in Access 2003 (tied to an SQL backend):

I have three tables, Jobs, JobsSub, JobsDetails for a project tracking database I inherited. Three forms are tied to those tables, which I've renamed frmJobs, frmJobsSub, and frmJobsDetails, and they are nested in that order.

This database has run fine for a long time with this arrangment, but I accidentally discovered something today as I was working with the form layout to make the interface a little cleaner.

Portions of all three forms are displayed at once inside frmJobs with button/tabs hiding the least important data. Logically, the user would enter info into frmJobs, which creates a unique ID based on an Autonumber. From there, they click farther down into the frmJobsSub to enter information regarding a specific instance of work at a project site (which Autonumbers a new SubID), and then from there they go to the frmJobsDetails to enter line-items of what is to be done.

If, however, this is not done in order, the frmJobsDetails does not "inherit" (for lack of a better word) the SubID from frmJobsSub, and even though the data is stored, the connection to the proper SubID is lost.

I cannot come up with a way to programmatically assign a new SubID (in tblJobsSub) if the user skips the frmJobsSub fields and goes straight for the frmJobsDetails.

Does this make sense?

Keep in mind I've never taken a VBA class, and am self-taught based on help screens and google searches. So, speak slowly, I'll try to keep up.

I appreciate all help in advance.
 

Users who are viewing this thread

Back
Top Bottom