Greetings...
I'm trying to run a Sub Routine from an embedded Macro in Access...
In the macro I'm using the Action: RunCode which requires you to build a Function.
So I have built a function to call the VBA routine, which happens to be a query.
The Error I'm getting is:
"The object doesn't contain the automation object 'SendToPrintTable'
You tried to run a Visual Basic procedure to set a property or method for an object. However the component doesn't make the property or method available for Automation operations
Check the components documentation for information on the properties and methods it makes available for Automation operations."
Here is my Function:
Code:
Function SendToPrintTable()
Call CreatePrintRecord
End Function
And here is my sub Routine
Code:
Private Sub CreatePrintRecord()
DoCmd.SetWarnings False
DoCmd.RunSQL "INSERT INTO tblUINPrintRecords VALUES('" & Me.TxtUIN.Value & "','" & Me.TxtFaxNum.Value & "','" & Me.TxtRecipient.Value & "', #" & _
Me.TxtRqstDate.Value & "#,'" & Me.TxtRqstProvName.Value & "','" & Me.TxtPatName.Value & "','""" & "');"
DoCmd.SetWarnings True
End Sub
Thanks for any help with this one....