Problem getting search function to work on report

  • Thread starter evilcowstare via AccessMonster.com
  • Start date
E

evilcowstare via AccessMonster.com

Can anyone help with this?
I have the same function on another database but I cant get it to work on
this one..

I wanted to be able to basically search jobs and create a report based on a
part or full postcode, so for example if you have postcodes 12345 12987 98789
94840 and enter 12 it would bring up 12345 and 12987 in the report...
This is the way I did it.
I created a form with an uncontrolled text box on it say form1 textbox1, i
then created a query picking out from the main table the fields I want it to
pick up on job no, name, address, postcode.
Under the criteria of postcode I put Like [Forms]![form1]![textbox1] &
"*"

I then created a report based on this query.

I cannot get it to work though, if I take out the code the query runs fine,
the moment I add it it lists nothing?

Any ideas on what I could be missing?

Thank You
 
J

John W. Vinson

Can anyone help with this?
I have the same function on another database but I cant get it to work on
this one..

I wanted to be able to basically search jobs and create a report based on a
part or full postcode, so for example if you have postcodes 12345 12987 98789
94840 and enter 12 it would bring up 12345 and 12987 in the report...
This is the way I did it.
I created a form with an uncontrolled text box on it say form1 textbox1, i
then created a query picking out from the main table the fields I want it to
pick up on job no, name, address, postcode.
Under the criteria of postcode I put Like [Forms]![form1]![textbox1] &
"*"

I then created a report based on this query.

I cannot get it to work though, if I take out the code the query runs fine,
the moment I add it it lists nothing?

Any ideas on what I could be missing?

Thank You

Please post the SQL view of the query. A couple of questions: is Form1 open
when you run this? Is this Table a local Access table, or linked from some
other software?

John W. Vinson [MVP]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top