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

Setting criteria to Access Checkbox

P: n/a
Sid
I hope someone could help me with this.

I am trying to setup a criteria to decide when to allow/not allow
user
to click on the check box. logically it looks simple but I am not
able
to incorporate in my data access page. I have a numerical field
called
tier status and right next to it I have a checkbox. I would like to
allow user to check and uncheck the checkbox as long as the tier
status field is less than 3 and I was hoping that checkbox would be
disabled as as as the tier status is 3 or higher.
I am really not sure how to work that on access. I was hoping if
someone could help me with that.
Thanks,
Sid

Jun 19 '07 #1
Share this Question
Share on Google+
8 Replies


P: n/a
You just need to add code in two places: the TierStatus AfterUpdate event,
and the Form Current event. The first one (AfterUpdate) takes care of the
user changing the value while in the record; and the second one (Form
Current) takes care of existing values when the user navigates to a
particular record.

Just put this code in both of those places:

Me.MyCheckBox.Enabled = Me.TierStatus < 3

Change "MyCheckBox" and "TierStatus" to whatever the names of the controls
are.

Also, if you want the check box to be enabled (so that users can sort or
filter on it), but locked, you can use the Locked property instead:

Me.MyCheckBox.Locked = Me.TierStatus < 3

Neil

"Sid" <ad******@gmail.comwrote in message
news:11*********************@n60g2000hse.googlegro ups.com...
>I hope someone could help me with this.

I am trying to setup a criteria to decide when to allow/not allow
user
to click on the check box. logically it looks simple but I am not
able
to incorporate in my data access page. I have a numerical field
called
tier status and right next to it I have a checkbox. I would like to
allow user to check and uncheck the checkbox as long as the tier
status field is less than 3 and I was hoping that checkbox would be
disabled as as as the tier status is 3 or higher.
I am really not sure how to work that on access. I was hoping if
someone could help me with that.
Thanks,
Sid

Jun 19 '07 #2

P: n/a
Put the following code in the form's Current event:
Me!TierStatusCheckbox.Enabled = Me!TierStatus < 3

Also put the following code in TierStatus AfterUpdate event:
Me!TierStatusCheckbox.Enabled = Me!TierStatus < 3

PC Datasheet
Providing Customers A Resource For Help With Access, Excel And Word
Applications
re******@pcdatasheet.com


"Sid" <ad******@gmail.comwrote in message
news:11*********************@n60g2000hse.googlegro ups.com...
>I hope someone could help me with this.

I am trying to setup a criteria to decide when to allow/not allow
user
to click on the check box. logically it looks simple but I am not
able
to incorporate in my data access page. I have a numerical field
called
tier status and right next to it I have a checkbox. I would like to
allow user to check and uncheck the checkbox as long as the tier
status field is less than 3 and I was hoping that checkbox would be
disabled as as as the tier status is 3 or higher.
I am really not sure how to work that on access. I was hoping if
someone could help me with that.
Thanks,
Sid

Jun 19 '07 #3

P: n/a
Sid
On Jun 19, 10:49 am, "Neil" <nos...@nospam.netwrote:
You just need to add code in two places: the TierStatus AfterUpdate event,
and the Form Current event. The first one (AfterUpdate) takes care of the
user changing the value while in the record; and the second one (Form
Current) takes care of existing values when the user navigates to a
particular record.

Just put this code in both of those places:

Me.MyCheckBox.Enabled = Me.TierStatus < 3

Change "MyCheckBox" and "TierStatus" to whatever the names of the controls
are.

Also, if you want the check box to be enabled (so that users can sort or
filter on it), but locked, you can use the Locked property instead:

Me.MyCheckBox.Locked = Me.TierStatus < 3

Neil

"Sid" <addal...@gmail.comwrote in message

news:11*********************@n60g2000hse.googlegro ups.com...
I hope someone could help me with this.
I am trying to setup a criteria to decide when to allow/not allow
user
to click on the check box. logically it looks simple but I am not
able
to incorporate in my data access page. I have a numerical field
called
tier status and right next to it I have a checkbox. I would like to
allow user to check and uncheck the checkbox as long as the tier
status field is less than 3 and I was hoping that checkbox would be
disabled as as as the tier status is 3 or higher.
I am really not sure how to work that on access. I was hoping if
someone could help me with that.
Thanks,
Sid- Hide quoted text -

- Show quoted text -
Thanks for your reply. I have got a small question. my form is
accessing data from two different queries. Check box data source is
one query while tier status data source is in another query. I would
really appreciate if you could tell me how to update the code in such
a case. Also Tier status column is not an editable column in the form.
it is just for display purpose. User sees the tier staus in the form
and decides whether is click the check box or not......finally when
the tier status is 3 or greater than 3, I am trying to make the
checkbox disabled just to ensure its not accidentally clicked

I hope someone could make sense of scribbling.

Thanks again
Sid

Jun 19 '07 #4

P: n/a
<< my form is accessing data from two different queries >>
Impossible! A form can only access data from a table or a query. If a query,
the query can include one or more tables, one or more other queries or a
combination of tables and queries. Please explain your statement.

What ever you mean by the above statement, it doesn't matter that the
checkbox and tier status are from different data sources. All the code is
doing is looking at the value in tier status.

<<finally when the tier status is 3 or greater than 3, I am trying to make
the checkbox disabled just to ensure its not accidentally clicked>>
Neil's code does that!

The code may need to be modified depending on your response to the above
first paragraph.

PC Datasheet
Providing Customers A Resource For Help With Access, Excel And Word
Applications
re******@pcdatasheet.com

"Sid" <ad******@gmail.comwrote in message
news:11**********************@m36g2000hse.googlegr oups.com...
On Jun 19, 10:49 am, "Neil" <nos...@nospam.netwrote:
>You just need to add code in two places: the TierStatus AfterUpdate
event,
and the Form Current event. The first one (AfterUpdate) takes care of the
user changing the value while in the record; and the second one (Form
Current) takes care of existing values when the user navigates to a
particular record.

Just put this code in both of those places:

Me.MyCheckBox.Enabled = Me.TierStatus < 3

Change "MyCheckBox" and "TierStatus" to whatever the names of the
controls
are.

Also, if you want the check box to be enabled (so that users can sort or
filter on it), but locked, you can use the Locked property instead:

Me.MyCheckBox.Locked = Me.TierStatus < 3

Neil

"Sid" <addal...@gmail.comwrote in message

news:11*********************@n60g2000hse.googlegr oups.com...
>I hope someone could help me with this.
I am trying to setup a criteria to decide when to allow/not allow
user
to click on the check box. logically it looks simple but I am not
able
to incorporate in my data access page. I have a numerical field
called
tier status and right next to it I have a checkbox. I would like to
allow user to check and uncheck the checkbox as long as the tier
status field is less than 3 and I was hoping that checkbox would be
disabled as as as the tier status is 3 or higher.
I am really not sure how to work that on access. I was hoping if
someone could help me with that.
Thanks,
Sid- Hide quoted text -

- Show quoted text -

Thanks for your reply. I have got a small question. my form is
accessing data from two different queries. Check box data source is
one query while tier status data source is in another query. I would
really appreciate if you could tell me how to update the code in such
a case. Also Tier status column is not an editable column in the form.
it is just for display purpose. User sees the tier staus in the form
and decides whether is click the check box or not......finally when
the tier status is 3 or greater than 3, I am trying to make the
checkbox disabled just to ensure its not accidentally clicked

I hope someone could make sense of scribbling.

Thanks again
Sid

Jun 19 '07 #5

P: n/a
Sid
On Jun 19, 1:42 pm, "Steve" <s...@private.emailaddresswrote:
<< my form is accessing data from two different queries >>
Impossible! A form can only access data from a table or a query. If a query,
the query can include one or more tables, one or more other queries or a
combination of tables and queries. Please explain your statement.

What ever you mean by the above statement, it doesn't matter that the
checkbox and tier status are from different data sources. All the code is
doing is looking at the value in tier status.

<<finally when the tier status is 3 or greater than 3, I am trying to make
the checkbox disabled just to ensure its not accidentally clicked>>
Neil's code does that!

The code may need to be modified depending on your response to the above
first paragraph.

PC Datasheet
Providing Customers A Resource For Help With Access, Excel And Word
Applications
resou...@pcdatasheet.com

"Sid" <addal...@gmail.comwrote in message

news:11**********************@m36g2000hse.googlegr oups.com...
On Jun 19, 10:49 am, "Neil" <nos...@nospam.netwrote:
You just need to add code in two places: the TierStatus AfterUpdate
event,
and the Form Current event. The first one (AfterUpdate) takes care of the
user changing the value while in the record; and the second one (Form
Current) takes care of existing values when the user navigates to a
particular record.
Just put this code in both of those places:
Me.MyCheckBox.Enabled = Me.TierStatus < 3
Change "MyCheckBox" and "TierStatus" to whatever the names of the
controls
are.
Also, if you want the check box to be enabled (so that users can sort or
filter on it), but locked, you can use the Locked property instead:
Me.MyCheckBox.Locked = Me.TierStatus < 3
Neil
"Sid" <addal...@gmail.comwrote in message
>news:11*********************@n60g2000hse.googlegr oups.com...
I hope someone could help me with this.
I am trying to setup a criteria to decide when to allow/not allow
user
to click on the check box. logically it looks simple but I am not
able
to incorporate in my data access page. I have a numerical field
called
tier status and right next to it I have a checkbox. I would like to
allow user to check and uncheck the checkbox as long as the tier
status field is less than 3 and I was hoping that checkbox would be
disabled as as as the tier status is 3 or higher.
I am really not sure how to work that on access. I was hoping if
someone could help me with that.
Thanks,
Sid- Hide quoted text -
- Show quoted text -
Thanks for your reply. I have got a small question. my form is
accessing data from two different queries. Check box data source is
one query while tier status data source is in another query. I would
really appreciate if you could tell me how to update the code in such
a case. Also Tier status column is not an editable column in the form.
it is just for display purpose. User sees the tier staus in the form
and decides whether is click the check box or not......finally when
the tier status is 3 or greater than 3, I am trying to make the
checkbox disabled just to ensure its not accidentally clicked
I hope someone could make sense of scribbling.
Thanks again
Sid- Hide quoted text -

- Show quoted text -
Sorry if I am being very clear. I am kind of new to Access.

Let me try to restate.

I am using a data access page. The idea is to display certain
information (Name, Emp no, dept, etc.). They are only for display
purpose so I have set the fields to be non editable. data for all this
information is being pooled from a query (Query 1). I am using another
query (query 2) as data source for one of the fields (Tier Status) in
the form (Again for purely display purpose, therefore non
editable).Based on all these fields of information user decides to
approve or disapporve. This information gets stored in through
checkbox entry.

So essentially forms diplays information from two queries
Query 1
Name, Dept, Employee No, etc (all non editable)
Approved/Disapproved (editable ....this is for storing the checkbox
entry)

Query 2
Tier status (non editable)

Both queries are linked through a common variable employee no

I hope this makes it little more clearer

Jun 19 '07 #6

P: n/a
Sorry, but I have no experience in ADP and am unable to help you.

Steve
"Sid" <ad******@gmail.comwrote in message
news:11**********************@o61g2000hsh.googlegr oups.com...
On Jun 19, 1:42 pm, "Steve" <s...@private.emailaddresswrote:
><< my form is accessing data from two different queries >>
Impossible! A form can only access data from a table or a query. If a
query,
the query can include one or more tables, one or more other queries or a
combination of tables and queries. Please explain your statement.

What ever you mean by the above statement, it doesn't matter that the
checkbox and tier status are from different data sources. All the code is
doing is looking at the value in tier status.

<<finally when the tier status is 3 or greater than 3, I am trying to
make
the checkbox disabled just to ensure its not accidentally clicked>>
Neil's code does that!

The code may need to be modified depending on your response to the above
first paragraph.

PC Datasheet
Providing Customers A Resource For Help With Access, Excel And Word
Applications
resou...@pcdatasheet.com

"Sid" <addal...@gmail.comwrote in message

news:11**********************@m36g2000hse.googleg roups.com...
On Jun 19, 10:49 am, "Neil" <nos...@nospam.netwrote:
You just need to add code in two places: the TierStatus AfterUpdate
event,
and the Form Current event. The first one (AfterUpdate) takes care of
the
user changing the value while in the record; and the second one (Form
Current) takes care of existing values when the user navigates to a
particular record.
>Just put this code in both of those places:
> Me.MyCheckBox.Enabled = Me.TierStatus < 3
>Change "MyCheckBox" and "TierStatus" to whatever the names of the
controls
are.
>Also, if you want the check box to be enabled (so that users can sort
or
filter on it), but locked, you can use the Locked property instead:
> Me.MyCheckBox.Locked = Me.TierStatus < 3
>Neil
>"Sid" <addal...@gmail.comwrote in message
>>news:11*********************@n60g2000hse.googleg roups.com...
>I hope someone could help me with this.
I am trying to setup a criteria to decide when to allow/not allow
user
to click on the check box. logically it looks simple but I am not
able
to incorporate in my data access page. I have a numerical field
called
tier status and right next to it I have a checkbox. I would like to
allow user to check and uncheck the checkbox as long as the tier
status field is less than 3 and I was hoping that checkbox would be
disabled as as as the tier status is 3 or higher.
I am really not sure how to work that on access. I was hoping if
someone could help me with that.
Thanks,
Sid- Hide quoted text -
>- Show quoted text -
Thanks for your reply. I have got a small question. my form is
accessing data from two different queries. Check box data source is
one query while tier status data source is in another query. I would
really appreciate if you could tell me how to update the code in such
a case. Also Tier status column is not an editable column in the form.
it is just for display purpose. User sees the tier staus in the form
and decides whether is click the check box or not......finally when
the tier status is 3 or greater than 3, I am trying to make the
checkbox disabled just to ensure its not accidentally clicked
I hope someone could make sense of scribbling.
Thanks again
Sid- Hide quoted text -

- Show quoted text -

Sorry if I am being very clear. I am kind of new to Access.

Let me try to restate.

I am using a data access page. The idea is to display certain
information (Name, Emp no, dept, etc.). They are only for display
purpose so I have set the fields to be non editable. data for all this
information is being pooled from a query (Query 1). I am using another
query (query 2) as data source for one of the fields (Tier Status) in
the form (Again for purely display purpose, therefore non
editable).Based on all these fields of information user decides to
approve or disapporve. This information gets stored in through
checkbox entry.

So essentially forms diplays information from two queries
Query 1
Name, Dept, Employee No, etc (all non editable)
Approved/Disapproved (editable ....this is for storing the checkbox
entry)

Query 2
Tier status (non editable)

Both queries are linked through a common variable employee no

I hope this makes it little more clearer

Jun 19 '07 #7

P: n/a
Sid
On Jun 19, 2:45 pm, "Steve" <s...@private.emailaddresswrote:
Sorry, but I have no experience in ADP and am unable to help you.

Steve

"Sid" <addal...@gmail.comwrote in message

news:11**********************@o61g2000hsh.googlegr oups.com...
On Jun 19, 1:42 pm, "Steve" <s...@private.emailaddresswrote:
<< my form is accessing data from two different queries >>
Impossible! A form can only access data from a table or a query. If a
query,
the query can include one or more tables, one or more other queries or a
combination of tables and queries. Please explain your statement.
What ever you mean by the above statement, it doesn't matter that the
checkbox and tier status are from different data sources. All the code is
doing is looking at the value in tier status.
<<finally when the tier status is 3 or greater than 3, I am trying to
make
the checkbox disabled just to ensure its not accidentally clicked>>
Neil's code does that!
The code may need to be modified depending on your response to the above
first paragraph.
PC Datasheet
Providing Customers A Resource For Help With Access, Excel And Word
Applications
resou...@pcdatasheet.com
"Sid" <addal...@gmail.comwrote in message
>news:11**********************@m36g2000hse.googleg roups.com...
On Jun 19, 10:49 am, "Neil" <nos...@nospam.netwrote:
You just need to add code in two places: the TierStatus AfterUpdate
event,
and the Form Current event. The first one (AfterUpdate) takes care of
the
user changing the value while in the record; and the second one (Form
Current) takes care of existing values when the user navigates to a
particular record.
Just put this code in both of those places:
Me.MyCheckBox.Enabled = Me.TierStatus < 3
Change "MyCheckBox" and "TierStatus" to whatever the names of the
controls
are.
Also, if you want the check box to be enabled (so that users can sort
or
filter on it), but locked, you can use the Locked property instead:
Me.MyCheckBox.Locked = Me.TierStatus < 3
Neil
"Sid" <addal...@gmail.comwrote in message
>news:11*********************@n60g2000hse.googlegr oups.com...
I hope someone could help me with this.
I am trying to setup a criteria to decide when to allow/not allow
user
to click on the check box. logically it looks simple but I am not
able
to incorporate in my data access page. I have a numerical field
called
tier status and right next to it I have a checkbox. I would like to
allow user to check and uncheck the checkbox as long as the tier
status field is less than 3 and I was hoping that checkbox would be
disabled as as as the tier status is 3 or higher.
I am really not sure how to work that on access. I was hoping if
someone could help me with that.
Thanks,
Sid- Hide quoted text -
- Show quoted text -
Thanks for your reply. I have got a small question. my form is
accessing data from two different queries. Check box data source is
one query while tier status data source is in another query. I would
really appreciate if you could tell me how to update the code in such
a case. Also Tier status column is not an editable column in the form.
it is just for display purpose. User sees the tier staus in the form
and decides whether is click the check box or not......finally when
the tier status is 3 or greater than 3, I am trying to make the
checkbox disabled just to ensure its not accidentally clicked
I hope someone could make sense of scribbling.
Thanks again
Sid- Hide quoted text -
- Show quoted text -
Sorry if I am being very clear. I am kind of new to Access.
Let me try to restate.
I am using a data access page. The idea is to display certain
information (Name, Emp no, dept, etc.). They are only for display
purpose so I have set the fields to be non editable. data for all this
information is being pooled from a query (Query 1). I am using another
query (query 2) as data source for one of the fields (Tier Status) in
the form (Again for purely display purpose, therefore non
editable).Based on all these fields of information user decides to
approve or disapporve. This information gets stored in through
checkbox entry.
So essentially forms diplays information from two queries
Query 1
Name, Dept, Employee No, etc (all non editable)
Approved/Disapproved (editable ....this is for storing the checkbox
entry)
Query 2
Tier status (non editable)
Both queries are linked through a common variable employee no
I hope this makes it little more clearer- Hide quoted text -

- Show quoted text -
Steve,

Thank you though for effort.

Sid

Jun 19 '07 #8

P: n/a
I'm not familiar with Data Access Pages. However, if Tier Status is not
editable, then you wouldn't need anything in the AfterUpdate event (if there
is such a thing). You would only need to run the code when a new record is
accessed (either On Current event, or whatever is the equivalent in Data
Access Pages). That's the best I can do here.

Neil
"Sid" <ad******@gmail.comwrote in message
news:11**********************@o61g2000hsh.googlegr oups.com...
On Jun 19, 1:42 pm, "Steve" <s...@private.emailaddresswrote:
><< my form is accessing data from two different queries >>
Impossible! A form can only access data from a table or a query. If a
query,
the query can include one or more tables, one or more other queries or a
combination of tables and queries. Please explain your statement.

What ever you mean by the above statement, it doesn't matter that the
checkbox and tier status are from different data sources. All the code is
doing is looking at the value in tier status.

<<finally when the tier status is 3 or greater than 3, I am trying to
make
the checkbox disabled just to ensure its not accidentally clicked>>
Neil's code does that!

The code may need to be modified depending on your response to the above
first paragraph.

PC Datasheet
Providing Customers A Resource For Help With Access, Excel And Word
Applications
resou...@pcdatasheet.com

"Sid" <addal...@gmail.comwrote in message

news:11**********************@m36g2000hse.googleg roups.com...
On Jun 19, 10:49 am, "Neil" <nos...@nospam.netwrote:
You just need to add code in two places: the TierStatus AfterUpdate
event,
and the Form Current event. The first one (AfterUpdate) takes care of
the
user changing the value while in the record; and the second one (Form
Current) takes care of existing values when the user navigates to a
particular record.
>Just put this code in both of those places:
> Me.MyCheckBox.Enabled = Me.TierStatus < 3
>Change "MyCheckBox" and "TierStatus" to whatever the names of the
controls
are.
>Also, if you want the check box to be enabled (so that users can sort
or
filter on it), but locked, you can use the Locked property instead:
> Me.MyCheckBox.Locked = Me.TierStatus < 3
>Neil
>"Sid" <addal...@gmail.comwrote in message
>>news:11*********************@n60g2000hse.googleg roups.com...
>I hope someone could help me with this.
I am trying to setup a criteria to decide when to allow/not allow
user
to click on the check box. logically it looks simple but I am not
able
to incorporate in my data access page. I have a numerical field
called
tier status and right next to it I have a checkbox. I would like to
allow user to check and uncheck the checkbox as long as the tier
status field is less than 3 and I was hoping that checkbox would be
disabled as as as the tier status is 3 or higher.
I am really not sure how to work that on access. I was hoping if
someone could help me with that.
Thanks,
Sid- Hide quoted text -
>- Show quoted text -
Thanks for your reply. I have got a small question. my form is
accessing data from two different queries. Check box data source is
one query while tier status data source is in another query. I would
really appreciate if you could tell me how to update the code in such
a case. Also Tier status column is not an editable column in the form.
it is just for display purpose. User sees the tier staus in the form
and decides whether is click the check box or not......finally when
the tier status is 3 or greater than 3, I am trying to make the
checkbox disabled just to ensure its not accidentally clicked
I hope someone could make sense of scribbling.
Thanks again
Sid- Hide quoted text -

- Show quoted text -

Sorry if I am being very clear. I am kind of new to Access.

Let me try to restate.

I am using a data access page. The idea is to display certain
information (Name, Emp no, dept, etc.). They are only for display
purpose so I have set the fields to be non editable. data for all this
information is being pooled from a query (Query 1). I am using another
query (query 2) as data source for one of the fields (Tier Status) in
the form (Again for purely display purpose, therefore non
editable).Based on all these fields of information user decides to
approve or disapporve. This information gets stored in through
checkbox entry.

So essentially forms diplays information from two queries
Query 1
Name, Dept, Employee No, etc (all non editable)
Approved/Disapproved (editable ....this is for storing the checkbox
entry)

Query 2
Tier status (non editable)

Both queries are linked through a common variable employee no

I hope this makes it little more clearer

Jun 19 '07 #9

This discussion thread is closed

Replies have been disabled for this discussion.