Open a form to a specific record from a subform (1 Viewer)

cbrace09

Registered User.
Local time
Today, 02:27
Joined
Jun 5, 2009
Messages
25
Hello again, I have a new problem today. I hope someone can help.

I have a from named "Defendants Home" This form also has a Tab Control with 3 pages - "Employment History", "Address History", and "Phone Number History". I also have plans to add a "Contact Log" page as well.

All subforms are linked to the Defendant ID field on the main form.

Here is what I am trying to do:

For example, the employment history sub form has the following fields and code:

Link - Here's the problem! - This txtbox should act as a cmd button to open the form "Employers" and display the company name selected in the subform.
CODE - MACRO in the on click event - Employer Information, Form, , [Forms]![Defendants Home]![Defendant Employment History subform].[Form]![CompanyName]=[Forms]![Employer Information]![CompanyName], , Normal

VerifDate - txt box - date employment was verfied

Company Name - this is what I am trying to link to. This field is a combo box slecting records from the table employers.

Title - txt box

Hire Date - txt box

Memo - memo field

Thanks everyone!
 

cbrace09

Registered User.
Local time
Today, 02:27
Joined
Jun 5, 2009
Messages
25
Just a thought - Is the problem related to using a Tab Control?

Maybe I could do something like having three command buttons. Each command button will show the related subform but hide the others at the same time?
 

Users who are viewing this thread

Top Bottom