Display related fields in a report

L

lhtan123

I have a "View Details" button on a form which upon clicked, displays details
of one or more employees in a report format.

The form (child table) has textboxes that displays the EmployeeID which is a
PK for the Employee Table (Parent table).

I'm not sure if this is feasible but have written some code below that
iterates through the textboxes. I want to have more than one Employees'
record to be displayed.
*********
Private Sub btnViewEmployee_Click()
Dim ctl As Control

For Each ctl In Me.Frame194.Controls
Select Case ctl.ControlType
Case acTextBox
DoCmd.OpenReport "ViewEmployee", acViewPreview, , ,
acWindowNormal
End Select
Next

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top