Dis/Enabling via Checkbox status

January 6, 2009 at 18:28:48
Specs: Windows XP, Pent. D - 512Mb
Hello all,

My apologies if this has been answered previously, but I could not find anything specific enough to answer my question. I dare say it will be a very simple solution anyway.

I am working with Access 2003.

I have got a checkbox which is controlled by a record source on a form and when the value of the checkbox is True, certain text boxes on the same form are disabled and others are enabled. When the value is False, the configuration is reversed.

On it's own, this function works well - in the check box AfterUpdate code I call a private sub routine which is an If statement that performs the actions necessary.

The problem is however, that when navigating through the records the checkbox reflects the correct value as stored in the control record, but the text boxes remain enabled/disabled as they were from the previous record.

A couple of clicks on the checkbox rectifies this, but then of course the next record viewed is incorrect again.

I have tried invoking the same subroutine as used on the checkbox AfterUpdate against many different events and several different controls to no avail. These include obvious things like Form_Load and Form_AfterUpdate as well as some more obscure ones.

I'm sure this can't be a difficult thing to overcome, but regardless of what I try I cannot successfully achieve what I need.

Any help anyone can afford would be greatly appreciated.

Thanks in advance!

See More: Dis/Enabling via Checkbox status

Report •

January 20, 2009 at 07:30:42
In the Form_Current event

If Condition is True Then

Me.txtBox1.enable = True
Me.txtbox99.enable = True
Me.txtBox1.enable = False
Me.txtbox99.enable = False

Hope this is helpful.

Report •
Related Solutions

Ask Question