SetValue Compatibilty issues

nate

Registered User.
Local time
Today, 00:40
Joined
May 19, 2010
Messages
29
I use Access 2010, and my co-workers use Access 2007. I created a database, btu I am the only one who can open it, so I rebuilt it as an Access 2003 file (they still can't open it, even when I save it as a 2007 file, but i know there are compatibility issues between them).

Anyway, its all fine, except on one of my forms, there is a SetValue macro used, specifically, on a subform, when they choose a product the cost comes up. It worked in the original databse, but wont in the rebuild. It comes up with a "SetValue cannot be opened in disabled mode" message- even though I have it in a trusted location, and have turned off every security measure I can find on the computer.

Does anyone know how I can get this macro to work, or if there is an alternative method I could use?

This is the macro btw;

SubMacro: SetUnitPrice : AfterUpdate

SetValue
Item = [UnitPrice]
Expression = DLookUp("UnitPrice","TblClasses","ClassID = " & [ClassID])


Thanks
 
Are you sure any of your code runs? Can you set a couple of breakpoints to verify this?
 
SubMacro: SetUnitPrice : AfterUpdate

SetValue
Item = [UnitPrice]
Expression = DLookUp("UnitPrice","TblClasses","ClassID = " & [ClassID])

I assume this is a DataMacro (Trigger) in a table, then this is ONLY for Access 2010.

In earlier versions this will be considered as a violation of normalization/Data integrity, you don't store calculated values in tables.

JR
 
Last edited:

Users who are viewing this thread

Back
Top Bottom