I have an AC2007 database which is split frontend/backend. Users access data via forms. I Use a linked one-to-many table to allow users to add ongoing series of comments about each record listed on the main form. Hope to avoid using tabbed subform so that the linked comments only open when needed, not every time the main form is opened.
A command button was added to the main form. It opens a second form which is filtered to the ID of the main form. This works great for viewing existing data. But, now I want the user to also have the option of adding new records on the second form. But, I don't know how to pass the PK to the second form for new records. The form opened with the command button will currently allow users to enter a new record into the second table, but it does not record the PK and the new record is just orphaned.
I know this would work great as a subform on a tab. But, there are so many controls on the mainform and various subforms that I would like to go the route of a command button. that way the related records are only loaded when needed. Is it possible to tell the second form to pass on the current ID when the user tabs to a new record?