QBF form and search

odun

Registered User.
Local time
Today, 01:51
Joined
Apr 24, 2005
Messages
108
Hello all:

I have a form that is attached to a query.

In my query, I have the following criteria:

[Company] Like [Forms]![QBF_Form]![Sales] & "*" Or [Forms]![QBF_Form]![Sales] Is Null

But it only allows me to search that particular field either when I put in a blank or when I put in something like: cad*

I want to be able to also search like this:
*cad*
not cad*
cad* or pdf*
*cad* or *pdf*

Is this possible?

Thanks for your help!
 
I'm not sure that you can search as you want to, not like that anyway. To search for a string within a string, change your search criteria to this.

Like "*" & [Forms]![QBF_Form]![Sales] & "*" Or [Forms]![QBF_Form]![Sales] Is Null

The 'or' part of the criteria simply returns all records, for the specified field,not a seperate search.
 
Thanks. This only allows me to search for:

*cad*
*pdf*

but does not allow me to search for"
*cad* or *pdf*
cad* or pdf*
Not cad*
<>cad*

Any other ideas?

Thanks!
 
I think that you will need to base the form on an SQL string and use code to parse the criteria and build a new SQL.

HTH

Peter
 
Can you please tell me how to this step by step or refer me to a website that has these details.

Thanks again.
 

Users who are viewing this thread

Back
Top Bottom