This is an Access 2010 Web Database
I have a table, [MaintenanceRequired]. I created a Named Macro, 'MaintReqdNew'.
The table has 4 columns, ID, Asset (a lookup column linked to the Assets table by the Assets.ID), Detail (a text field), and TypeOfMaint (a lookup column linked to the MaintenanceType table by MaintenanteType.ID).
The macro has 3 parameters: AssetID, MaintTypeID, and Details.
I pass in the three values, and the macro does a CreatedRecord, with 3 SetField commands. Asset = [AssetID], Detail = [Details], TypeOfMaint = [MaintTypeID].
OnError is set to GoTo Next, and the next command is LogEvent Description = [MaintTypeID].
The record gets created with the correct Asset and Details, but no TypeOfMaint. With no OnError, I get: The field 'TypeOfMaint' cannot accept the data type supplied by SetField.
With the LogEvent I get the value: [MaintTypeID]
I tried TypeOfMaint = [MaintTypeID].Value and LogEvent Description = [MaintTypeID].Value, and that's what shows up in the log. I'm pretty sure I'm passing in a valid integer. In the code that calls the macro, I have a TempVar that I dump to a field on the form and then also use to pass to the Macro. The field on the form shows the correct int ID.
Where am I going wrong? What could I do different? What information haven't I provided that would help you help me?