Querying Form Fields

LEXCERM

Registered User.
Local time
Today, 15:15
Joined
Apr 12, 2004
Messages
169
Hi all,

I've been on this all day and what I thought would be so easy to do, is actually turning into a nightmare!

Simple scenario: One form has a combination of eight text fields and combos. I want to be able to query one field or a combination of fields.

In the query design I have selected the necessary table fields and in the criterias have tried things like:

Like "*" & [Form]![Form1]![txtfield1] & "*" or [Form]![Form1]![txtfield1] Is null

[Form]![Form1]![txtfield1] or Is Null

The list goes on. Whenever I query the form on say just one field, I get nothing returned...or all records...or a mish-mash of data which isn't correct!

Thanks in advance,
Paul.
 
Give this ago in your query

Like [Forms]![frmSearchEngine06122009]![cboUnderWriter] & "*" Or Is Null
 
Thanks Trevor. I think that has resolved my issue.

Just one small question. Between the word "Like" and "[Forms]![......" you have not placed a "*". Is this just a typo, or have you purposely ommitted it?

Many thanks once again,
Paul.
 
When using wild characters you can decide if you want to search for anything before a character or after, so I am using the after, because the list appears in a combo box this suits my purpose.
 
Yep, I gotcha.

Thanks again for your solution.

Paul.
 

Users who are viewing this thread

Back
Top Bottom