Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Have a Query search for Blank fields?

Status
Not open for further replies.

lexis7

Programmer
Sep 23, 2002
26
US
Not quite sure if this is possible....

I have a form(frmEnterInfo) that has many different fields(ex. first name, last name, DOB, job title...).

I have another form(frmSearch) that allows users to select a field and type in a value to search. This is done through a simple select query.

I have a third form(frmViewResults) whose recordsource is the results of the query.

What I want users to be able to do is search for [blanks]in a field so that they can view what fields are missing data.

Is this possible?
Thanks in advance for any help!

Alexis
 
lexis 7,

Yes it is possible. The criteria for the fields in which you are searching for blanks should read "IS NULL" if the fields nave had no data. If there is a chance that they have had data which was deleted or removed by someone using the backspace key, then there could be zero length strings ( "" ) in the fields as well. In that case, use IS NULL Or "" in the criteria field.

If the users leave the search value blank, put the IS NULL Or "" in the criteria.
 
Hi,

Thanks for letting me know this was possible, but I don't know how to code it or where to put the (Is Null or "").

-I call my query through code
'Open the "View" form
DoCmd.OpenForm "frmInvoices_Search"
'Pull recordset from query into the "View" form
Forms!frmInvoices_Search.RecordSource = "Query",

-And in the query design view I already have my expression in the criteria row.
[Forms]![frmSEARCH]![txtCheckNumber]

Any more help?

thanks,
alexis
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top