PhoenixDon
MIS
The subject line doesn't explain this question well.
I have a table with several fields. One YES/NO field that indicates which is the active contest. I want only one record to be active at a time. I know I can do this with code, but I'm trying to use a macro to get this done. Here are my steps.
1. SetWarnings, NO
2. SetTempVar, MyTempVar, [Forms]![Contest Information]![ContestID]
3. RunSQL, UPDATE [Contest Information] SET [Contest Information].Active = False;,Yes
4. RunSQL, UPDATE [Contest Information] SET [Contest Information].Active = True WHERE ((([Contest Information].[ContestID])=[TempVars]![MyTempVar])), Yes
5. RunCommand, SaveRecord
6. SetWarnings, Yes
Works fine, but I get a write conflict warning when I save the record. Is there any easier way or am I making it harder than it is?
Thanks,
Don
I have a table with several fields. One YES/NO field that indicates which is the active contest. I want only one record to be active at a time. I know I can do this with code, but I'm trying to use a macro to get this done. Here are my steps.
1. SetWarnings, NO
2. SetTempVar, MyTempVar, [Forms]![Contest Information]![ContestID]
3. RunSQL, UPDATE [Contest Information] SET [Contest Information].Active = False;,Yes
4. RunSQL, UPDATE [Contest Information] SET [Contest Information].Active = True WHERE ((([Contest Information].[ContestID])=[TempVars]![MyTempVar])), Yes
5. RunCommand, SaveRecord
6. SetWarnings, Yes
Works fine, but I get a write conflict warning when I save the record. Is there any easier way or am I making it harder than it is?
Thanks,
Don