error message on conditional macro

  • Thread starter Thread starter lyn
  • Start date Start date
L

lyn

In a subform, I have a conditional macro set up to update
a field (PatientID) when XXX is selected in the Sponsor
field.

The macro is set to run "afterupdate" of the sponsor field
as follows:

Condition: [Sponsor]="XXX"
Action: SetValue
Item: [PatientID]
Expression: [Parent]![XXX#]

The macro does what I need it to do, however, when I close
the record I get the "can't save record at this time"
error message. (However, when I do close and reopen the
record, the data is still there).

Any ideas of what is causing this error message, and how I
could change the macro so that it doesn't appear? (I
failed with adding a SetWarnings action to No).

Thanks.
 
Lyn,

I can't really see exactly why you are getting this error message.
However, a couple of things to try...

1. After your SetValue action, put another action in your macro
RunCommand/SaveRecord, just to see what will happen.
2. Forget the idea of using SetValue, and make an Update Query instead
to assign the XXX# to the PatientID field, and use an OpenQuery action
in your macro to make it happen.
 
Back
Top