Rachel,
If you have a form built already to display information, why not use it with a command that searches all the fields and builds the criteria needed. ie Name:txtName
City:txtCity
St :txtState
You need a clear command to clear all the fields and a search command button.
sub cmdSearch_click()
dim s as string
if not isEmpty(txtName) then s="Name like ' & trim(txtName) & "'"
if not isEmpty(txtCity) then
if not isEmpty(s) then s=s & " And "
s=s & s="City like ' & trim(txtCity) & "'"
...
if not isEmpty(s) then s=" Where " & s
end sub
Otherwise you have to populate a list of fields and add functionality for multiple selections.
hth MikeD
btw
public Function isEmpty(anyString as string) as boolean
if trim(s)=vbNullString then
isEmpty=True
endif
end function
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement