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!

Can I base a Query in a Form on the Block

Status
Not open for further replies.

krindler

Programmer
Jul 16, 2002
39
US
Hello....

I am running a form that asks the user to enter in a vendor. Once the vendor is entered, I run a query that will bring back all vendors in our system that contain what the user entered in (i.e., '%VENDOR%' ). Once the query is finished, another form is opened containing all vendors returned from the query, as well as a checkbox. The user will go through and check which vendors he or she would like the report run for. Once they have selected all they would like, they click a button to run the report, putting the the vendors they selected into Excel, using OLE2.

My question is this....Is there a way to base the query that runs the actual report to Excel, on the block (the vendors the user checked). Any help anyone could give me would be much appreciated.

Thanks In Advance!
 
if you (could do what you want) you should consider this: what will happen if the query based on the block level runs when the form first loads(when-new-form-instance)?!!! it will:
1- exclude some vendors
2- raise a form error when it checks for your selected vendors whom are not selected yet(all my consideration is when the form first loads, at that time no check boxes selected yet, correct??)
try this:
use a when-window-closed trigger after selection made to run your query and publish the report.
i hope this might help
bye
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top