P
ploddinggaltn
I'm using this code to search for records with a form with one field in view
as the search sourse. Once the find cmdbutton is clicked, the remaining
fields on the form become visible with the data for that record. I have two
issues, one is the search only brings back one result when there are 3
records with the same last name (last name is the search criteria). The
other issue is some of my lables are not appearing when the Find cmdbutton is
clicked. I've tried copying the formatting for labels that do appear and
that is not working...any ideas for either of these issues is appreciated.
Thank you...here is my code.
Private Sub cmdFindStudent_Click()
Dim ctlx As Control
For Each ctlx In Me.Controls
If TypeOf ctlx Is TextBox Or TypeOf ctlz Is ComboBox Or TypeOf ctlz
Is Label Then
ctlx.Visible = True
End If
Next ctlx
DoCmd.ApplyFilter , "[LastName]= '" & txtLastName & "'"
End Sub
as the search sourse. Once the find cmdbutton is clicked, the remaining
fields on the form become visible with the data for that record. I have two
issues, one is the search only brings back one result when there are 3
records with the same last name (last name is the search criteria). The
other issue is some of my lables are not appearing when the Find cmdbutton is
clicked. I've tried copying the formatting for labels that do appear and
that is not working...any ideas for either of these issues is appreciated.
Thank you...here is my code.
Private Sub cmdFindStudent_Click()
Dim ctlx As Control
For Each ctlx In Me.Controls
If TypeOf ctlx Is TextBox Or TypeOf ctlz Is ComboBox Or TypeOf ctlz
Is Label Then
ctlx.Visible = True
End If
Next ctlx
DoCmd.ApplyFilter , "[LastName]= '" & txtLastName & "'"
End Sub