By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,057 Members | 1,249 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,057 IT Pros & Developers. It's quick & easy.

Checkbox on form to change query result

tuxalot
100+
P: 200
I have a checkbox on a form. When checked, I want my report query to change FirstName LastName to "Privacy Case". Report shows employee injury data with each employee representing a line on the report. Other non-privacy cases will also appear on the same report.

Example:

John Smith Accounting Injury data here...
Privacy Case Engineering Injury data here...
Sara Jones Kitchen Injury data here...

Using Access 2007. Any help is appreciated.
Feb 3 '09 #1
Share this Question
Share on Google+
2 Replies


100+
P: 365
What about:

Expand|Select|Wrap|Line Numbers
  1. IIf(checkbox=false,[Surname],'Privacy Case')
Feb 3 '09 #2

tuxalot
100+
P: 200
Along the same line of thinking, I was going to try this:

=IIf([checkbox]=-1,"Privacy",[FirstName])

=IIf([checkbox]=-1,"Case",[LastName])

Looks like it may work.

Thanks for the info. Dan2kx!
Feb 3 '09 #3

Post your reply

Sign in to post your reply or Sign up for a free account.