Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Text box shows wrong resulsts for checkbox=false

Status
Not open for further replies.

RobertIngles

Technical User
Jan 20, 2011
113
CA
Back again, thanks for your help PH. I moved the code to the OnCurrent event but unchecked boxes still return the same results as checkbox=true - ie all records show [VIPID] as "VIP" even if checkbox is false. I have searched the web and every reference book I have and still can't identify what I am doing wrong. HELP!

Private Sub Form_Current()
If Me.VIPUser = True Then
Me.VIPID = "VIP"
Else
Me.VIPID = Null
End If
End Sub
 
Hi Robert,

2 thoughts.

1) Instead of setting Me.VIPID to null, try space or blank ""

2) If your form is a continuous form, then what you are trying to do will not work. Me.VIPID will have the value of the last record.

If indeed you are using a continuous form, you can do one of the following.
a) Use conditional formatting.
or
b) Set a temp field in a query to "VIP" or Blank, and then use the query and bind to the temp field.

Hope This Helps,
Hap...

Access Developer [pc] Access based Accounting Solutions - with free source code
Access Consultants forum
 
Thanks so much HAP007, used the temp field in the query and SUCCESS!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top