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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using Nz function

Status
Not open for further replies.

scottian

Programmer
Jul 3, 2003
955
GB
First off, im sorry for cross posting, ive just realized i used the wrong forum.

I have a query which im trying to get working. I have a form which displays the results but also has 3 unbound text boxes. the user types in the text box/boxes then the query uses this to filter the data. What im using is 'Like Nz()& "*"' which means they can put in part of the text. Everything works great for two of the boxes, but when i try all three i get strange results.

any help much appreciated

"My God! It's full of stars...
 
Is the third box checking something other than a text field?

Greg
"Personally, I am always ready to learn, although I do not always like being taught." - Winston Churchill
 
No,

The first box is 'Job Type' the second is 'Engineer Name' and the third is 'Job Number'. So the form opens with all the records and the user can filter. But i can only get it to work with Job Type and Engineer Name. But its more important that we can filter by the job number.

"My God! It's full of stars...
 

Please provide some code. If you show us what you have, we can help you fix it.

Randy
 
PHV has kindly provided this for me on my other post, suggesting the '+' instead of the '&'. Also it sticks extra brackets around the SQL, im not sure if this has an affect but just thought i'd mention it.

WHERE tblJobData.JobNumber Like Nz([Forms]![frmAllJobs]![JobNumber] + '*', tblJobData.JobNumber)
AND tblJobData.EngName Like Nz([Forms]![frmAllJobs]![EngName] + '*', tblJobData.EngName)
AND tblJobData.JobType Like Nz([Forms]![frmAllJobs]![JobType] + '*', tblJobData.JobType)

and LesPaul you are correct, is that the problem?

"My God! It's full of stars...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top