Help with 2 operations

  • Thread starter Thread starter Jeff F via AccessMonster.com
  • Start date 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
 
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.
 
Back
Top