eckert1961
Registered User.
- Local time
- Today, 16:08
- Joined
- Oct 25, 2004
- Messages
- 90
Hello,
I have a main form that contains a combo box named ViewActive that lets me selective Active=Yes, No or when I double-click it all records are displayed.
When I select Yes then I only see active students when I use the record navigation to scroll through the records.
On the same form I have another Combo Box that displays the students names. If I select the pull down list all names are displayed whether or not I've selected the Active=Yes. The following is the AfterUpdate Code that I have linked to the Members combo box.
Private Sub cboMembers_AfterUpdate()
Dim rst As Recordset
Const QUOTE = """"
Set rst = Me.RecordsetClone
rst.Sort = ("[LastName]")
rst.FindFirst "([FirstName]& "" "" & [LastName] )= " & QUOTE & Me!cboMembers & QUOTE
If rst.NoMatch Then
MsgBox "No match was found. Student not in database!"
Else
Me.Bookmark = rst.Bookmark
End If
rst.Close
End Sub
Can someone note what needs to be changed so that only the names of the Active or Inactive members are displayed in this combo box depending on what is selected from the ViewActive combo box?
Thanks,
Chris
I have a main form that contains a combo box named ViewActive that lets me selective Active=Yes, No or when I double-click it all records are displayed.
When I select Yes then I only see active students when I use the record navigation to scroll through the records.
On the same form I have another Combo Box that displays the students names. If I select the pull down list all names are displayed whether or not I've selected the Active=Yes. The following is the AfterUpdate Code that I have linked to the Members combo box.
Private Sub cboMembers_AfterUpdate()
Dim rst As Recordset
Const QUOTE = """"
Set rst = Me.RecordsetClone
rst.Sort = ("[LastName]")
rst.FindFirst "([FirstName]& "" "" & [LastName] )= " & QUOTE & Me!cboMembers & QUOTE
If rst.NoMatch Then
MsgBox "No match was found. Student not in database!"
Else
Me.Bookmark = rst.Bookmark
End If
rst.Close
End Sub
Can someone note what needs to be changed so that only the names of the Active or Inactive members are displayed in this combo box depending on what is selected from the ViewActive combo box?
Thanks,
Chris