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

Combo Box from Query get Enter Parameters box

Status
Not open for further replies.

jedlag

Technical User
Aug 6, 2001
15
US
I hate to beat a dead horse, but I've gone through this forum from top to bottom and still can't get this figured out.

I have a query to populate a Report. I have the criteria in the Date field as Between [Enter Beginning Date:] and [Enter Ending Date:] This works...the way it should! I also have a County field that in the Criteria is [Enter County to Search:] This works....

I thought it would be a time saver by letting the user choose from a combo box and the choice making up the criteria for the County. The problem comes in when I attempt to reference the Form (Search By County) with the Field (SearchCounty) in the Criteria of the query. What I get is the regular popup which says

Enter Parameter Value
Forms!Search By County!SearchCounty

I went through the forums and found every reference to this I could find and attempted everything I found--one of which was:

Like NZ([Forms]![Search By County Form]![SearchCounty],"") & "*"

plus others, even went through help in Access for Using a Form to Enter Report Criteria. I followed step by step, but as soon as I put anything in the criteria under County, it did the same thing, no Search By County Form, just the Enter Parameter Value.

I've put in quotes but Access gives me a syntax error. Am I missing something relatively simple? Any help on this would be greatly appreciated! I've been attempting this small trick for a week now and still haven't figured out which shell the ball is under!



 

If I am understanding you correctly, you want the form to open after opening the report or query. It doesn't work that way. The form must already be open for the query to work. If the form is not open, Access cannot resolve the form control reference in the criteria and so it asks for the parameter value.

This should be the procedure.

1- Open form.
2- Select entry in combo box.
3- Hit command button or perform another action to open the report.

If I've misunderstood, please explain a little more about your process. Terry L. Broadbent
Life would be easier if I had the source code. -Anonymous
 
Hi Terry,

Thanks for responding. All I thought I wanted to do was give a date parameter for my Report and give a County parameter for the same Report. When I do this the easy way, ie putting in the criteria under date and County [enter beginning date][enter ending date] [enter county] everything works great.

I've gone through and read everything I can about this combo box thing (hoping to make it easier on some of our not so good spellers), I decided to see if the combo box would work for the Counties.

All I wanted to do was have the beginning and Ending Date pop up for the query to filter on, and then have this custom box pop up with the combo box and have the user choose the County, hit a button to filter still more of the query, and then generate the Report.

I've appearantly missed something vital, because following along with what's written on the forum, and Access 2000 help, as soon as I put anything in the criteria referencing the Form with the combo box, I get the regular Enter Parameter Value box.

OK, so I have to have the Search By County form open at which time my [enter beginning date] and [enter ending date] will pop up and then the query will go to the open Search By County Form and then generate the report?

How do I get my Search By County Form to always be open? I appologize Terry, I've been banging my head on a couple of other problems that the forums have helped me with, but this one seems to be the stickler! Any help is greatly appreciated, I know it can be done, it's just that I'm missing a step or too.

jedlag






 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top