combo boxes (1 Viewer)

w0od0o

Registered User.
Local time
Today, 06:16
Joined
Jan 13, 2009
Messages
87
hi, i have created a form with 3 combo boxes on to filter through to a desired quote, i can get it to filter through if all fields are filled in but if for example there is no site name then i cant find the quote number.

at the moment i have in a the sql builder [Forms]![add_quote]![site] & "*" but if site is blank then no quote number is there,

all help welcome

many thanks in advance

w0od0o
 

vbaInet

AWF VIP
Local time
Today, 06:16
Joined
Jan 22, 2010
Messages
26,374
Something like this perhaps:

Code:
Like IIF(Len([Forms]![add_quote]![site]) = 0, "", [Forms]![add_quote]![site] & "*")
Although this use of Like is not advisable.
 

dkinley

Access Hack by Choice
Local time
Today, 00:16
Joined
Jul 29, 2008
Messages
2,016
Using combo boxes, eh?

I would assume that you might have a query that is using multiple tables (because of the combo box assumption of doing lookups in other tables especially with disparate table sounding names like quote and site). If so, ensure that you are using left-joins on the tables so there isn't a need for data to be in both tables for a record to populate your query. Do this in the QBE on the link between the tables. Choose the 'all records from the main table and matching tables from the child table' if this is the case.

-dK
 

Users who are viewing this thread

Top Bottom