Clicking a check box disable another box

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Here is what I am trying to figure out:

I have a check box named "deploy".
When I check the box, I want to disable the capability of a box named
"Barcode" to where it is dimmed and not accessable. If any one could help me,
I would really appreicate it. I have been working on this for 3 weeks now.

Thanks
 
How about an after update event on the checkbox like:
(checkDeploy is the name of the checkbox)

if Me.checkDeploy = True then
Me.barcode.enabled = False
else
Me.barcode.enabled = True
end if

There are probably other ways to do the same, this is just one way.

SteveD
 
Here is what I am trying to figure out:

I have a check box named "deploy".
When I check the box, I want to disable the capability of a box named
"Barcode" to where it is dimmed and not accessable. If any one could help me,
I would really appreicate it. I have been working on this for 3 weeks now.

Thanks

In the form's Current event and also the [Deploy] AfterUpdate event,
code:
Me![Barcode].Enabled = Me![Deploy] = False
 
fredg said:
Here is what I am trying to figure out:

I have a check box named "deploy".
When I check the box, I want to disable the capability of a box named
"Barcode" to where it is dimmed and not accessable. If any one could help me,
I would really appreicate it. I have been working on this for 3 weeks now.

Thanks

In the form's Current event and also the [Deploy] AfterUpdate event,
code:
Me![Barcode].Enabled = Me![Deploy] = False
 
Fred
I have a question about this solution I recentely did the same and it works.
But why do you need to put twice the same code in the form?

Hope you can explain me this.

Herman
fredg said:
Here is what I am trying to figure out:

I have a check box named "deploy".
When I check the box, I want to disable the capability of a box named
"Barcode" to where it is dimmed and not accessable. If any one could help me,
I would really appreicate it. I have been working on this for 3 weeks now.

Thanks

In the form's Current event and also the [Deploy] AfterUpdate event,
code:
Me![Barcode].Enabled = Me![Deploy] = False
 
Fred
I have a question about this solution I recentely did the same and it works.
But why do you need to put twice the same code in the form?

Hope you can explain me this.

Herman
fredg said:
Here is what I am trying to figure out:

I have a check box named "deploy".
When I check the box, I want to disable the capability of a box named
"Barcode" to where it is dimmed and not accessable. If any one could help me,
I would really appreicate it. I have been working on this for 3 weeks now.

Thanks

In the form's Current event and also the [Deploy] AfterUpdate event,
code:
Me![Barcode].Enabled = Me![Deploy] = False

If you change the check box value, it will immediately enable/disable
the barcode control.
You place it in the current event so that if you navigate to the
record in the future, the current event will fire and disable/enable
the control as indicated by the current record check box value.
Otherwise the control would be enabled/disabled according to whatever
the check box value was at the last time it was changed on ANY record.
 
I was wondering where is the form's Current event located and was wondering
what was (Me.)? I understand the code, but don't understand where it goes,
please help me. Thank You.

fredg said:
Here is what I am trying to figure out:

I have a check box named "deploy".
When I check the box, I want to disable the capability of a box named
"Barcode" to where it is dimmed and not accessable. If any one could help me,
I would really appreicate it. I have been working on this for 3 weeks now.

Thanks

In the form's Current event and also the [Deploy] AfterUpdate event,
code:
Me![Barcode].Enabled = Me![Deploy] = False
 
I was wondering where is the form's Current event located and was wondering
what was (Me.)? I understand the code, but don't understand where it goes,
please help me. Thank You.

fredg said:
Here is what I am trying to figure out:

I have a check box named "deploy".
When I check the box, I want to disable the capability of a box named
"Barcode" to where it is dimmed and not accessable. If any one could help me,
I would really appreicate it. I have been working on this for 3 weeks now.

Thanks

In the form's Current event and also the [Deploy] AfterUpdate event,
code:
Me![Barcode].Enabled = Me![Deploy] = False

The form's Current event fires each time you navigate to a new record.
In Form Design View, display the form's property sheet.
Click on the Event tab.
Click on the line that says On Current.
Write
[Event Procedure]
on that line.
Click on the little button with 3 dots that appears on that line.
The Code window will open with the cursor flashing in the Current
event.
Write your code there.
 
I was wondering where is the form's Current event located and was wondering
what was (Me.)? I understand the code, but don't understand where it goes,
please help me. Thank You.

fredg said:
Here is what I am trying to figure out:

I have a check box named "deploy".
When I check the box, I want to disable the capability of a box named
"Barcode" to where it is dimmed and not accessable. If any one could help me,
I would really appreicate it. I have been working on this for 3 weeks now.

Thanks

In the form's Current event and also the [Deploy] AfterUpdate event,
code:
Me![Barcode].Enabled = Me![Deploy] = False

I forgot to add...
The keyword Me refers to the object in which this code resides.
Used in this case it refers to this form. Used elsewhere, i.e. in a
report, it refers to that report. It saves the time of writing:
forms!FormName each time you wish to refer to the parent object.
It is very useful when you copy and paste code from one object to the
other, as you do not need to actually name the object.
 
I just wanted to thank you Fredg. you helped me solve my problem! Thanks a
million!

fredg said:
I was wondering where is the form's Current event located and was wondering
what was (Me.)? I understand the code, but don't understand where it goes,
please help me. Thank You.

fredg said:
On Wed, 2 Feb 2005 12:17:02 -0800, conmecsmith wrote:

Here is what I am trying to figure out:

I have a check box named "deploy".
When I check the box, I want to disable the capability of a box named
"Barcode" to where it is dimmed and not accessable. If any one could help me,
I would really appreicate it. I have been working on this for 3 weeks now.

Thanks

In the form's Current event and also the [Deploy] AfterUpdate event,
code:
Me![Barcode].Enabled = Me![Deploy] = False

The form's Current event fires each time you navigate to a new record.
In Form Design View, display the form's property sheet.
Click on the Event tab.
Click on the line that says On Current.
Write
[Event Procedure]
on that line.
Click on the little button with 3 dots that appears on that line.
The Code window will open with the cursor flashing in the Current
event.
Write your code there.
 
Thanks, this has also resolved my problem that I had listed on the previous
thread to this. I also was wondering what the 'Me.' thing was all about and
now I know. Cheers.
 
Back
Top