Help with 2 operations

  • Thread starter Jeff F via AccessMonster.com
  • Start date
J

Jeff F via AccessMonster.com

Not sure if this is the right forum but here goes. First, I have never used
VBA before, only macros but cant seem to get macros to do what I need here.

Ok - I have one macro that runs then outputs a report for a given record to
an email. This works fine. Also, I have an update query built that changes
two fields ("phase" and "date"). Ok, both prompt the user to enter a record
ID. Now, what I need is to have one command button on an already built form
that uses that form's record ID to perform both tasks - (1) run the report
and attach it to an email and (2) perform the update query. I know its not
too difficult but my lack of experience with VBA is holding me back.

Thanks in advance for any assistance.

Jeff
 
S

Steve Schapel

Jeff,

On the form, put a combobox or a taxtbox, where the user can
select/enter the record required. Then, in the query that the report is
based on, and also in the update query, refer to this form control in
the criteria of the ID field, using syntax such as...
[Forms]![NameOfForm]![NameOfComboOrTextbox]

It sounds like you already have a parameter prompt entered in the
criteria of this field in the queries. Is that right? If so, just
replace what you have currently there with the criteria.
 

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