Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Make a field in a subform link to another form. I have tried many of the methods

ID: 3560709 • Letter: M

Question

Make a field in a subform link to another form.

I have tried many of the methods posted and none of them work so I am posting anew.

I have a database for employee trainings and performance that will in the future be expanded for additional uses, thus the need for a variety of tables for departments, status, etc.

The First Form, which I will refer to as form 1, is a Subform within a Form. This Subform is a list of all of the employees in the facility. The Form itself is just a host for the Subform with options like 'New Employee' etc...

The Second Form, which I will refer to as form 2, is a tabbed form. This has several tabs that will pull information from different tables within the database to be viewed and/or edited. The purpose of the form is to show an expandable detailed view of the information in all the tabs (safety, production, etc) for the individual employee selected.

I am trying to make a field from the subform on form 1, preferrably the 'Employee ID' or 'Employee Name' field, a hyperlink to form 2. I want to be able to click on the ID or name of the employee and have the link open up form 2 to that employees record information. So far all attempts have failed.

Help me, please

Explanation / Answer

.,First, have you considered using a split form? A split form shows a datasheet view of your table with a columnar view. You can then scroll, search or filter through the datasheet section and when you select a record, that record is displayed in the columnar view. You can add your other controls to a split form as well. ""

But if you want to use what you have, it is easy to do. You use the OpenForm method with a WHERE clause. The WHERE clause should "PKField = " & PKControl

If its not working, then either you are using the wrong name for the field or for the control. The fact that its prompted you for EmployeeID indicates that there is a reference in the form to a field named EmployeeID that it can't find. So you should open your form in Design view and see if you have a control set to that or made a filter or sort set to that.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote