Help with SetValue on a different field in a form

P

Paul

I'm trying to set the value of a yes/no box based upon the value enterend in
the YTDOrders field on a form. The name of the yes/no box is
PreferredCustomer. If the value is < $10,001 I do not want the yes/no box to
be checked. If the value is > $10,000 I want the PreferredCustomer box
checked. I'm trying to do this via macro...Any help would be greatly
appreciated.

I have in the condition field:
[Forms]![frmtblCustomers]![YTDOrders]<10001
Action Field:
SetProperty (Arguments: preferredcustomer, Enabled, 0)
next line...Condition:[Forms]![frmtblCustomers]![YTDOrders]<10001
Action: StopMacro
next line...Condition:[Forms]![frmtblCustomers]![YTDOrders]>10000
Action:SetProperty (Arguments: preferredcustomer, Enabled, -1)
next line...Condition:...Action:SetValue (Arguments:
[Forms]![frmtblCustomers]![PreferredCustomer],
[Forms]![frmtblCustomers]![PreferredCustomer]=1)

This does not work...I have the macro (mcrfrmtblCustomers) called from "On
Exit" of YTDOrders which is a textbox formated for currency.
 
P

Paul

I needed to change the last line...Condition:...Action:SetValue (Arguments:
[Forms]![frmtblCustomers]![PreferredCustomer],
True)
That fixed my problem. Thanks...

Paul said:
I'm trying to set the value of a yes/no box based upon the value enterend in
the YTDOrders field on a form. The name of the yes/no box is
PreferredCustomer. If the value is < $10,001 I do not want the yes/no box to
be checked. If the value is > $10,000 I want the PreferredCustomer box
checked. I'm trying to do this via macro...Any help would be greatly
appreciated.

I have in the condition field:
[Forms]![frmtblCustomers]![YTDOrders]<10001
Action Field:
SetProperty (Arguments: preferredcustomer, Enabled, 0)
next line...Condition:[Forms]![frmtblCustomers]![YTDOrders]<10001
Action: StopMacro
next line...Condition:[Forms]![frmtblCustomers]![YTDOrders]>10000
Action:SetProperty (Arguments: preferredcustomer, Enabled, -1)
next line...Condition:...Action:SetValue (Arguments:
[Forms]![frmtblCustomers]![PreferredCustomer],
[Forms]![frmtblCustomers]![PreferredCustomer]=1)

This does not work...I have the macro (mcrfrmtblCustomers) called from "On
Exit" of YTDOrders which is a textbox formated for currency.
 

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