Computing.Net > Forums > Database > Dis/Enabling via Checkbox status

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Dis/Enabling via Checkbox status

Reply to Message Icon

Name: vanikyn
Date: January 6, 2009 at 18:28:48 Pacific
OS: Windows XP
CPU/Ram: Pent. D - 512Mb
Product: Osn / Nil
Subcategory: General
Comment:

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!



Sponsored Link
Ads by Google

Response Number 1
Name: orange
Date: January 20, 2009 at 07:30:42 Pacific
Reply:

In the Form_Current event

If Condition is True Then

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

Hope this is helpful.


0
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Database Forum Home


Sponsored links

Ads by Google


Results for: Dis/Enabling via Checkbox status

From Design Problem www.computing.net/answers/dbase/from-design-problem/106.html

Script to check database status www.computing.net/answers/dbase/script-to-check-database-status-/393.html

Importing .CSV www.computing.net/answers/dbase/importing-csv/308.html