aftershokk
Registered User.
- Local time
- Today, 11:18
- Joined
- Sep 5, 2001
- Messages
- 259
I have a converted macro that runs a query to pull out 1 record with a name that I want to use as the caption of a report for outputting to .pdf.
macro 2 below converted to VBA.
I want to take this result and add to the caption of my report that converts to .pdf below named email macro. I guess a need to assign the result of macro 2 to a variable and then populate into the report caption property but not sure how to do this? thanks
Function Macro2()
On Error GoTo Macro2_Err
DoCmd.OpenQuery "selected_specialist", acViewNormal, acEdit
Macro2_Exit:
Exit Function
Macro2_Err:
MsgBox Error$
Resume Macro2_Exit
End Function
----------------------------------------------------------------
Function email_macro()
On Error GoTo email_macro_Err
DoCmd.OpenReport "Specialist Attendance Report", acViewNormal, "", "", acNormal
email_macro_Exit:
Exit Function
email_macro_Err:
MsgBox Error$
Resume email_macro_Exit
End Function
macro 2 below converted to VBA.
I want to take this result and add to the caption of my report that converts to .pdf below named email macro. I guess a need to assign the result of macro 2 to a variable and then populate into the report caption property but not sure how to do this? thanks
Function Macro2()
On Error GoTo Macro2_Err
DoCmd.OpenQuery "selected_specialist", acViewNormal, acEdit
Macro2_Exit:
Exit Function
Macro2_Err:
MsgBox Error$
Resume Macro2_Exit
End Function
----------------------------------------------------------------
Function email_macro()
On Error GoTo email_macro_Err
DoCmd.OpenReport "Specialist Attendance Report", acViewNormal, "", "", acNormal
email_macro_Exit:
Exit Function
email_macro_Err:
MsgBox Error$
Resume email_macro_Exit
End Function