error message on conditional macro

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.
 
S

Steve Schapel

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top