So I am trying to automate an automatic update of a report to PDF. I am attempting to do it in a Macro since i will be
vacating this position in a month and the person who is replacing me has no knowledge of VBA. Hence, I am not familiar with
using Macros, I prefer using VBA.
Anyway, what I have done so far is create a query that shows any changes and what facility that change was made to.
My goal with using the Macro function is to esentially write an IF statment:
If me.date=Date() AND me.facility=(insert fac ID) THEN
I have established macros that generate that report depending on what faciiity has been choosen.
So does anybody have any idea how I could go about creating this in a MACRO?
I've tried the following:
1st Row: Action: OpenQuery "Query Name"
2nd Row: Action: SearchForRecord ARGUMENTS: WHERE date=Date() AND Facility=(insert ID)
3rd Row: CONDITION: True ACTION:RunMacro ARGUMENTS: FacilityName Macro
4th Row: CONDITION: False ACTION: CancelEvent
5th Row: ACTION: Close ARGUMENTS: "Query Name"
Anyway, when I run that Macro, the 3rd row always occurs whether or not that specific facility is in the query or not.
How can I change this Macro to make it so that if the specific facility is not in the query, the 3rd row is skipped and goes
to the 4th row?
Any help would be great!