button on form

G

Guest

I have a form that has a field called Vendor_Nbr. I have a button on this
form that generates a mailing label (rpt based on a query) when clicked.

What I need to happen is to allow the user to click the button on the form
and print a mailing label for the vendor_id (current record displayed on the
form) without having to enter the vendor id when prompted by the query. Is
there a way to do this? How can I have the Vendor_Nbr on the form
automatically be used as the Vendor_Nbr in the search criteria for the
mailing label report?


Thanks!
 
B

Barry Gilbert

In the criteria row in your query, replace your current prompt with:
Forms!MyFormName!Vendor_Nbr

HTH,
Barry
 
B

Barry Gilbert

In the criteria in your query replace [Enter vendor Id] with
Forms!MyFormName!Vendor_Nbr

HTH,
Barry
 

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

Similar Threads

Criteria 4
Record Count 1
If statement 3
On Current event 3
Help! - calculated control 6
select statement 3
Clicking label makes Dirty property True 10
subform 1

Top