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

Parameter query with User Input Via Combo Values

Status
Not open for further replies.

Quehay

Programmer
Feb 6, 2000
804
US
Situation: I'm trying to provide both (a)an informational form print of a query in a list box and (b) an outgoing report, both based on a paraquery.&nbsp;&nbsp;I want to have the user choose the parameter from a combo box.&nbsp;&nbsp;I've got the box populated (it appears in a popup form) and the query has &quot;WHERE field = [Forms]![frmName]![cboName]&quot; at the end of the SQL statement.<br><br>Question: What's the best way, i.e., which event, to send the value from the box to the query which resides in a separate query and a report, and then display it?&nbsp;&nbsp;Also, the list box doesn't like having a paraquery as Rowsource via Wizard, but does it work OK through code behind form?
 
NB The values are to be sent to a separate form not query.&nbsp;&nbsp;The list box currently has a RecordSource value of a strSQL that is a copy of the parameter query in entirety.
 
Don't mind me while I have fun with the new colors available in the editor:<br><br><font color=purple>I usually</font> just <font color=orange>pop a button onto the form</font> <font color=green>that opens the</font> <font color=red> query</font> or<font color=blue> report</font>. You don't need to <b><font color=brown>send</b></font> <font color=grey>the parms to the query</font>, <font color=fusia>just make sure the form is <b>open</b></font> <font color=royal> when you refer to it in the query</font>.
 
Elizabeth,<br><br>Thanks for the advice and the complimentary &quot;flashback&quot; experience!&nbsp;&nbsp;I guess it's pretty elementary that if the query is written correctly vis a vis the frm & combo box and there is a currently selected value in the popup form it has to work; just one of those things that takes doing a few times to get it.&nbsp;&nbsp;I haven't found a good written source for this without using macros (yuck).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top