A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

If statement to change check box value



 
 
Thread Tools Display Modes
  #1  
Old March 6th, 2006, 08:10 PM posted to microsoft.public.access.gettingstarted
external usenet poster
 
Posts: n/a
Default If statement to change check box value

I would like to create an If statement to change the value of a checkbox from
no to yes if the text in another field of the record meets my criteria. In
other words, if the text in the field "Employee" says "yes", then I want the
checkbox in the field "Exempt" to be checked. If the "Employee" field is
blank, I want the checkbox to be blank.

This is an easy formula in an Excel table (=IF (CELL1="yes",yes, no), but
I'm new to Access and not sure what code I should use or where I should put
it within my table. Any help?
  #2  
Old March 6th, 2006, 09:19 PM posted to microsoft.public.access.gettingstarted
external usenet poster
 
Posts: n/a
Default If statement to change check box value

Use a macro with a condition and action Set Value. You will need to
determine when/what would trigger the macro.

"bejewell" wrote:

I would like to create an If statement to change the value of a checkbox from
no to yes if the text in another field of the record meets my criteria. In
other words, if the text in the field "Employee" says "yes", then I want the
checkbox in the field "Exempt" to be checked. If the "Employee" field is
blank, I want the checkbox to be blank.

This is an easy formula in an Excel table (=IF (CELL1="yes",yes, no), but
I'm new to Access and not sure what code I should use or where I should put
it within my table. Any help?

  #3  
Old March 6th, 2006, 09:29 PM posted to microsoft.public.access.gettingstarted
external usenet poster
 
Posts: n/a
Default If statement to change check box value

Sorry, I am a "new user" and this is a little over my head. I haven't even
touched macros yet, so far I've just been working with tables, queries and
forms. I will need more guidance on macros if I am to do this...

Is there not just a simple way to enter a formula in the table or query like
one would do in Excel?

Thanks very much for your response!!!


"KARL DEWEY" wrote:

Use a macro with a condition and action Set Value. You will need to
determine when/what would trigger the macro.

"bejewell" wrote:

I would like to create an If statement to change the value of a checkbox from
no to yes if the text in another field of the record meets my criteria. In
other words, if the text in the field "Employee" says "yes", then I want the
checkbox in the field "Exempt" to be checked. If the "Employee" field is
blank, I want the checkbox to be blank.

This is an easy formula in an Excel table (=IF (CELL1="yes",yes, no), but
I'm new to Access and not sure what code I should use or where I should put
it within my table. Any help?

  #4  
Old March 6th, 2006, 09:38 PM posted to microsoft.public.access.gettingstarted
external usenet poster
 
Posts: n/a
Default If statement to change check box value

Thought it might help to show what I have done to this point...

In the Criteria row of the check box field, I entered:
IIf([EMPLOYEE]"yes",No,Yes)

I was trying to follow the same syntax as an Excel formula, which clearly
isn't the solution. When I save and run the query, it eliminates all records
that have "yes" in the EMPLOYEE field.




"KARL DEWEY" wrote:

Use a macro with a condition and action Set Value. You will need to
determine when/what would trigger the macro.

"bejewell" wrote:

I would like to create an If statement to change the value of a checkbox from
no to yes if the text in another field of the record meets my criteria. In
other words, if the text in the field "Employee" says "yes", then I want the
checkbox in the field "Exempt" to be checked. If the "Employee" field is
blank, I want the checkbox to be blank.

This is an easy formula in an Excel table (=IF (CELL1="yes",yes, no), but
I'm new to Access and not sure what code I should use or where I should put
it within my table. Any help?

  #5  
Old March 7th, 2006, 12:30 AM posted to microsoft.public.access.gettingstarted
external usenet poster
 
Posts: n/a
Default If statement to change check box value

You can use either code or a macro. But first as I said you will need to
determine when/what would trigger the macro or code.

Another solution is to run an update query. Again you will need to
determine when/what would trigger the query. Create a SELECT query with the
field to be updated and the field that is the decision is made on. Add the
criteria to that field. Run the query just for a check to see if the correct
records are being pulled. Then change the query to an update query by
opening the query in design view. Move your cursor over the icons on the
tool bar - look for the one that looks like a datasheet and an arrow head
pointing down. The text tip will say Query Type. Click the arrow head and
select Update Query. Enter the new information in the query grid. Run.


"bejewell" wrote:

Sorry, I am a "new user" and this is a little over my head. I haven't even
touched macros yet, so far I've just been working with tables, queries and
forms. I will need more guidance on macros if I am to do this...

Is there not just a simple way to enter a formula in the table or query like
one would do in Excel?

Thanks very much for your response!!!


"KARL DEWEY" wrote:

Use a macro with a condition and action Set Value. You will need to
determine when/what would trigger the macro.

"bejewell" wrote:

I would like to create an If statement to change the value of a checkbox from
no to yes if the text in another field of the record meets my criteria. In
other words, if the text in the field "Employee" says "yes", then I want the
checkbox in the field "Exempt" to be checked. If the "Employee" field is
blank, I want the checkbox to be blank.

This is an easy formula in an Excel table (=IF (CELL1="yes",yes, no), but
I'm new to Access and not sure what code I should use or where I should put
it within my table. Any help?

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Change Cell Color Based on IF Statement Cathy Worksheet Functions 3 December 16th, 2005 08:57 PM
Automatically change the text color when you check out the checkbo Dajana General Discussion 1 November 7th, 2005 09:35 PM
How can I change the title by a check box? Linds General Discussion 2 October 7th, 2005 11:56 PM
check if someone is changing a record while I want to change the s korsakow General Discussion 1 September 9th, 2005 11:47 AM
Spell Check using Change All option Ian Australia General Discussion 1 June 29th, 2005 02:07 PM


All times are GMT +1. The time now is 04:37 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.