Recall Client Stats is the name of the form.
Clientstemp is the name of the sub form
so far, I have the 3 combo boxes in the header, and the subform in the body of the form.
cboClients contains the list of all clients.
cboSC is one combo box containing a filter criteria
cboWaitlist is the second combo box with another filter criteria
(i was trying to post a print screen of the form but couldn't figure it out)
Something odd I also noticed is that when selecting a client from the list, where that client shares the same last name with others, the first client among those with the same last name will always be displayed; i.e. selecting the third or fourth 'Smith' from the list always brings up the first 'Smith'. I'm not sure if that's relevant or fodder for another post...
In researching this process i realize there's more than one way to achieve the desired result. i'm willing to start from scratch and learn a more efficient way if need be.
thanks for taking the time!!
- Private Sub cboClients_AfterUpdate()
-
'Moves to client Name text box and
-
'finds the record of whatever name is selected in the combo box
-
-
DoCmd.ShowAllRecords
-
Me!Clientstemp.SetFocus
-
DoCmd.FindRecord Me!cboClients
-
-
'just moves the highlighted cursor away from the Last Name after selection is made
-
DoCmd.GoToControl "middle name"
-
-
'Set value of combo box equal to an empty string
-
Me!cboClients.Value = ""
-
-
End Sub
-
-
Private Sub cboSC_AfterUpdate()
-
-
DoCmd.Requery "cboClients"
-
-
cboWaitlist = ""
-
-
cboSC_AfterUpdate_Exit:
-
Exit Sub
-
-
End Sub
-
-
Private Sub cboWaitlist_AfterUpdate()
-
-
DoCmd.Requery "cboClients"
-
-
cboSC = ""
-
-
cboWaitlist_AfterUpdate_Exit:
-
Exit Sub
-
-
End Sub
-
-
-
-
Private Sub cmdAllClients_Click()
-
-
Me.cboClients.RowSource = "all clients"
-
-
cmdallclients_click_exit:
-
Exit Sub
-
-
End Sub