I would like to be able to click on a form or preferably a record in a table and have it bring up a sub form with the same record. Is there any way to do this? Any help is appreciated.
I am assuming that by "subform" you mean a second form? Otherwise your main form's design view you should be able to use the subform wizard to insert the subform into the main form an link it with a parent/child link...
So here is the code for opening a second form from a main form:
If you are using a form then the code for your "On Click" event should look something like this:
- Change Form2Name to your second form's name
- Change UniqueID to the name of the field in your form that holds the unique id for the record
- Change UniqueID2 to fit the name of the second form's foreign unique id field
(I.E. - I have 2 tables, Table1 has a field called lastname, Table2 also has a lastname field which references the Table1 lastname)
Dim stDocName As String
Dim stLinkCriteria As String
As you can figure out "Directions" is the second form I want to popup and StoreNumber is the filed that should be the same on both forms. They both share the same table, if that makes a difference. Thank you for your help, I appreciate it.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.