PC Review


Reply
Thread Tools Rate Thread

Check boxes - Can I intercept the checking of...?

 
 
Maxwell
Guest
Posts: n/a
 
      18th May 2010
So I have a check box on a form that is attached to a field on a Link Table.
If you do not have a record created yet and click the check box, the whole
thing hangs - there is no primary key set.

So what I want to do is run an if/then function which checks/unchecks the
box if there is information in the main field (which contains a key on the
Link Table record) and does not if said field is empty. However, I can't see
where the checkbox action comes in.

I'm hesitant to use [Control].enabled because this is on a continuous
subform, so turning one instance on/off seems to turn the whole set off.

Grateful for any views on this...

Max

 
Reply With Quote
 
 
 
 
Amy E. Baggott
Guest
Posts: n/a
 
      18th May 2010
You can use the checkbox.enabled property. You just need to set it in the
OnCurrent Event. That way, it's only looking at the current record.
Something like:

Form_OnCurrent

If isNull(me.field1) Then
me.checkbox1.enabled = false
Else
me.checkbox1.enabled = true
End If

Hope this helps.
--
Amy E. Baggott

"I''''m going crazy and I''''m taking all of you with me!" -- Linda Grayson


"Maxwell" wrote:

> So I have a check box on a form that is attached to a field on a Link Table.
> If you do not have a record created yet and click the check box, the whole
> thing hangs - there is no primary key set.
>
> So what I want to do is run an if/then function which checks/unchecks the
> box if there is information in the main field (which contains a key on the
> Link Table record) and does not if said field is empty. However, I can't see
> where the checkbox action comes in.
>
> I'm hesitant to use [Control].enabled because this is on a continuous
> subform, so turning one instance on/off seems to turn the whole set off.
>
> Grateful for any views on this...
>
> Max
>

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Auto Check/Uncheck boxes based on checking 1 of 30 boxes Steve Stad Microsoft Access VBA Modules 8 24th May 2010 01:26 PM
check boxes on a form un-checking smeldawg Microsoft Access Forms 1 19th Mar 2008 01:55 PM
weird behavior when checking check boxes tiah.newsgroup@gmail.com Microsoft Excel Discussion 1 20th Mar 2007 04:59 PM
checking multiple check boxes =?Utf-8?B?TVdO?= Microsoft Access 3 2nd Aug 2006 02:24 AM
Checking a selection of check boxes =?Utf-8?B?a2ZuZw==?= Microsoft Access Forms 0 25th Jul 2006 01:41 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:45 PM.