D
Dave
I have a form which allows you to enter in data, hit
submit, and it shows the result in another form. Each
option has a drop down menu for you to select and it
queries based on the selection. Everything works correct
for the options I enter in (meaning a drop down will have
the option of yes, no, na..you select one).
What I want to be able to do is a search by a field that
draws data from table...but only shows the name once on
the drop down menu. Meaning, on my table, I will have
Assigned To field, which would display the names John Doe,
Jane Doe, Jim Smith, etc etc. Each name may have 2 or 3
entries in the table. I would like to be able to have a
drop down menu that draws the names, but only shows hte
name once, and able to query that name by what is selected.
Here is a portion of the code I currently have:
Dim sfilter As String
If Not IsNull(cmbCenter) Then
sfilter = "(
submit, and it shows the result in another form. Each
option has a drop down menu for you to select and it
queries based on the selection. Everything works correct
for the options I enter in (meaning a drop down will have
the option of yes, no, na..you select one).
What I want to be able to do is a search by a field that
draws data from table...but only shows the name once on
the drop down menu. Meaning, on my table, I will have
Assigned To field, which would display the names John Doe,
Jane Doe, Jim Smith, etc etc. Each name may have 2 or 3
entries in the table. I would like to be able to have a
drop down menu that draws the names, but only shows hte
name once, and able to query that name by what is selected.
Here is a portion of the code I currently have:
Dim sfilter As String
If Not IsNull(cmbCenter) Then
sfilter = "(
='" & cmbCenter & "') and "
End If
If Not IsNull(cmbCustType) Then
sfilter = sfilter & "([Customer Type] ='" &
cmbCustType & "') and "
End If
If Not IsNull(cmbCurrentStatus) Then
sfilter = sfilter & sfilter & "([Current Status] ='" &
cmbCurrentStatus & "') and "
End If
If Len(sfilter) Then sfilter = Left(sfilter, Len(sfilter) -
5)
DoCmd.OpenForm "frmResults", wherecondition:=sfilter
What would I need to do to complete my task? Thanks!!!
End If
If Not IsNull(cmbCustType) Then
sfilter = sfilter & "([Customer Type] ='" &
cmbCustType & "') and "
End If
If Not IsNull(cmbCurrentStatus) Then
sfilter = sfilter & sfilter & "([Current Status] ='" &
cmbCurrentStatus & "') and "
End If
If Len(sfilter) Then sfilter = Left(sfilter, Len(sfilter) -
5)
DoCmd.OpenForm "frmResults", wherecondition:=sfilter
What would I need to do to complete my task? Thanks!!!