View Full Version : Error in Macro-object doesn't contain the Automation object


databasemon
09-23-2010, 05:09 AM
Newbie! -- First Post!

I am using the SAME macro as the CALL TRACKER DB found in the TEMPLATES of MS Office 2007.

I copied the embedded macro on one of the forms to use on my form -which contains list of customers unique with the ID field. [Ex: A100, B100]
I have set the CustomerID to hyperlink and when the user clicks on that it opens up the selected detail of the customer in a dialog window were the user can change the values.


Macro used:


Action: open form
Argument: Customer Details
View: form
Where Condition: ="[ID]=" & Nz([ID],0)
Window Mode: Dialog

condition: Not IsNull([ID])
Action: SetTempVar
Arguments: CurrentID, [ID]

condition: IsNull([ID])
Action: SetTempVar
Arguments: CurrentID, Nz(DMax("[ID]",[Form].[RecordSource]),0)

Action:
requery
SearchForRecord
Arguments: , , First, ="[ID]=" & [TempVars]![CurrentID]

Action: RemoveTempVar
Arguments: CurrentID

The macro works great, I get my results but when i run the macro it gives the msg:

The object doesn't contain the Automation object 'ID'.

how can i correct this?

Does it matter if I am using a text field for the CustomerID rather than the long integer in the original macro?

Also, when I click on the hyperlink, a box pops up asking me to enter in the CustomerID again.