Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Parameter Forms
Message
From
05/10/2000 08:19:02
 
 
To
04/10/2000 05:17:52
Rachel Bray
Cornwall County Council
Truro, United Kingdom
General information
Forum:
Microsoft Office
Category:
Access
Title:
Miscellaneous
Thread ID:
00424590
Message ID:
00425223
Views:
19
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
Map
View

Click here to load this message in the networking platform