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
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only