Help with SetValue on a different field in a form

  • Thread starter Thread starter Paul
  • Start date Start date
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.
 
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.
 
Back
Top