trying to query an open/current record in order to email that reco

G

Guest

I want to be able to email the current record that I am entering in on a form. I created a control box that is set to run a query on my form and called it
bill_email. The query language is as follows:
SELECT [Bill Summary].[Bill Number], [Bill Summary].Hyperlink, [Bill
Summary].Sponsor, [Bill Summary].Summary, [Bill Summary].Analysis, [Bill
Summary].Background
FROM [Bill Summary]
WHERE ((([Bill Summary].[Bill Number])=forms!Bill_Summary!bill_email));

Bill Summary is the table, Bill Number, etc. are the fields. Bill_Summary is the form.

The idea is to run the query, then email the report that uses the query results. When I hit the control box in the form, I get the query data sheet view,
and it is empty. Any ideas? Or any ideas on how to email the current record from the form view? I am not a programmer, so I need specific information. Thanks
 
J

John Vinson

I want to be able to email the current record that I am entering in on a form. I created a control box that is set to run a query on my form and called it
bill_email. The query language is as follows:
SELECT [Bill Summary].[Bill Number], [Bill Summary].Hyperlink, [Bill
Summary].Sponsor, [Bill Summary].Summary, [Bill Summary].Analysis, [Bill
Summary].Background
FROM [Bill Summary]
WHERE ((([Bill Summary].[Bill Number])=forms!Bill_Summary!bill_email));

Bill Summary is the table, Bill Number, etc. are the fields. Bill_Summary is the form.

The idea is to run the query, then email the report that uses the query results. When I hit the control box in the form, I get the query data sheet view,
and it is empty. Any ideas? Or any ideas on how to email the current record from the form view? I am not a programmer, so I need specific information. Thanks

Julie, may I ask why you found it necessary to post this question five
times in quick succession?

If the record is still on the Form, then it is not stored in the table
yet. You'll need to add a line

If Me.Dirty = True Then Me.Dirty = False

in the VBA code before you run the query.

Also, you posted the query but not the code - could you please do so?
 

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