PC Review


Reply
Thread Tools Rate Thread

checkbox question

 
 
=?Utf-8?B?VG9kZA==?=
Guest
Posts: n/a
 
      16th Feb 2006
I have a MS Access 2003 question relating to checkboxes. I have a checkbox
on a form titled "grieved". I would like to use this item to make the next
textbox "grievancenum" grayed out / unavilable is the checkbox is not
selected and available if it is selected. Any help on this would be really
appreciated.
 
Reply With Quote
 
 
 
 
fredg
Guest
Posts: n/a
 
      16th Feb 2006
On Thu, 16 Feb 2006 11:07:31 -0800, Todd wrote:

> I have a MS Access 2003 question relating to checkboxes. I have a checkbox
> on a form titled "grieved". I would like to use this item to make the next
> textbox "grievancenum" grayed out / unavilable is the checkbox is not
> selected and available if it is selected. Any help on this would be really
> appreciated.


Code the check box AfterUpdate event:

Me![grievancenum].Enabled = Me![CheckBoxname]

Place the same code in the Form's Current event.
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
 
Reply With Quote
 
=?Utf-8?B?VG9kZA==?=
Guest
Posts: n/a
 
      17th Feb 2006
I tried your suggestion and got the following error message


The expression On Current you entered as the event property setting produced
the following error: The object doesn’t contain the Automation object ‘Me.’.

"fredg" wrote:

> On Thu, 16 Feb 2006 11:07:31 -0800, Todd wrote:
>
> > I have a MS Access 2003 question relating to checkboxes. I have a checkbox
> > on a form titled "grieved". I would like to use this item to make the next
> > textbox "grievancenum" grayed out / unavilable is the checkbox is not
> > selected and available if it is selected. Any help on this would be really
> > appreciated.

>
> Code the check box AfterUpdate event:
>
> Me![grievancenum].Enabled = Me![CheckBoxname]
>
> Place the same code in the Form's Current event.
> --
> Fred
> Please respond only to this newsgroup.
> I do not reply to personal e-mail
>

 
Reply With Quote
 
Douglas J. Steele
Guest
Posts: n/a
 
      17th Feb 2006
Did you simply type that expression into the box labelled On Current for the
form?

What you need to do is select [Event Procedure] from that box, and hit the
ellipsis (...) to the right.

You'll be taken into the VB Editor, with the lines

Private Sub Form_Current()

End Sub

Type that code between those two lines.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)


"Todd" <(E-Mail Removed)> wrote in message
news:118ADB1B-4C1D-4C1D-96A3-(E-Mail Removed)...
>I tried your suggestion and got the following error message
>
>
> The expression On Current you entered as the event property setting
> produced
> the following error: The object doesn't contain the Automation object
> 'Me.'.
>
> "fredg" wrote:
>
>> On Thu, 16 Feb 2006 11:07:31 -0800, Todd wrote:
>>
>> > I have a MS Access 2003 question relating to checkboxes. I have a
>> > checkbox
>> > on a form titled "grieved". I would like to use this item to make the
>> > next
>> > textbox "grievancenum" grayed out / unavilable is the checkbox is not
>> > selected and available if it is selected. Any help on this would be
>> > really
>> > appreciated.

>>
>> Code the check box AfterUpdate event:
>>
>> Me![grievancenum].Enabled = Me![CheckBoxname]
>>
>> Place the same code in the Form's Current event.
>> --
>> Fred
>> Please respond only to this newsgroup.
>> I do not reply to personal e-mail
>>



 
Reply With Quote
 
=?Utf-8?B?VG9kZA==?=
Guest
Posts: n/a
 
      17th Feb 2006
thanks... it works perfectly now.

"Douglas J. Steele" wrote:

> Did you simply type that expression into the box labelled On Current for the
> form?
>
> What you need to do is select [Event Procedure] from that box, and hit the
> ellipsis (...) to the right.
>
> You'll be taken into the VB Editor, with the lines
>
> Private Sub Form_Current()
>
> End Sub
>
> Type that code between those two lines.
>
> --
> Doug Steele, Microsoft Access MVP
> http://I.Am/DougSteele
> (no private e-mails, please)
>
>
> "Todd" <(E-Mail Removed)> wrote in message
> news:118ADB1B-4C1D-4C1D-96A3-(E-Mail Removed)...
> >I tried your suggestion and got the following error message
> >
> >
> > The expression On Current you entered as the event property setting
> > produced
> > the following error: The object doesn't contain the Automation object
> > 'Me.'.
> >
> > "fredg" wrote:
> >
> >> On Thu, 16 Feb 2006 11:07:31 -0800, Todd wrote:
> >>
> >> > I have a MS Access 2003 question relating to checkboxes. I have a
> >> > checkbox
> >> > on a form titled "grieved". I would like to use this item to make the
> >> > next
> >> > textbox "grievancenum" grayed out / unavilable is the checkbox is not
> >> > selected and available if it is selected. Any help on this would be
> >> > really
> >> > appreciated.
> >>
> >> Code the check box AfterUpdate event:
> >>
> >> Me![grievancenum].Enabled = Me![CheckBoxname]
> >>
> >> Place the same code in the Form's Current event.
> >> --
> >> Fred
> >> Please respond only to this newsgroup.
> >> I do not reply to personal e-mail
> >>

>
>
>

 
Reply With Quote
 
=?Utf-8?B?VG9kZA==?=
Guest
Posts: n/a
 
      17th Feb 2006
The final solution that works ended up looking something like this:

Private Sub Form_Load()

Me![Grievance Num].Enabled = False

End Sub


And the after update property on the Grieved checkbox:


Private Sub Grieved_AfterUpdate()

Me![Grievance Num].Enabled = Me![Grieved]

End Sub


It is now working perfectly.

Todd




"Todd" wrote:

> thanks... it works perfectly now.
>
> "Douglas J. Steele" wrote:
>
> > Did you simply type that expression into the box labelled On Current for the
> > form?
> >
> > What you need to do is select [Event Procedure] from that box, and hit the
> > ellipsis (...) to the right.
> >
> > You'll be taken into the VB Editor, with the lines
> >
> > Private Sub Form_Current()
> >
> > End Sub
> >
> > Type that code between those two lines.
> >
> > --
> > Doug Steele, Microsoft Access MVP
> > http://I.Am/DougSteele
> > (no private e-mails, please)
> >
> >
> > "Todd" <(E-Mail Removed)> wrote in message
> > news:118ADB1B-4C1D-4C1D-96A3-(E-Mail Removed)...
> > >I tried your suggestion and got the following error message
> > >
> > >
> > > The expression On Current you entered as the event property setting
> > > produced
> > > the following error: The object doesn't contain the Automation object
> > > 'Me.'.
> > >
> > > "fredg" wrote:
> > >
> > >> On Thu, 16 Feb 2006 11:07:31 -0800, Todd wrote:
> > >>
> > >> > I have a MS Access 2003 question relating to checkboxes. I have a
> > >> > checkbox
> > >> > on a form titled "grieved". I would like to use this item to make the
> > >> > next
> > >> > textbox "grievancenum" grayed out / unavilable is the checkbox is not
> > >> > selected and available if it is selected. Any help on this would be
> > >> > really
> > >> > appreciated.
> > >>
> > >> Code the check box AfterUpdate event:
> > >>
> > >> Me![grievancenum].Enabled = Me![CheckBoxname]
> > >>
> > >> Place the same code in the Form's Current event.
> > >> --
> > >> Fred
> > >> Please respond only to this newsgroup.
> > >> I do not reply to personal e-mail
> > >>

> >
> >
> >

 
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
Checkbox Question Duncs Microsoft Access 6 5th Oct 2009 07:20 PM
Yes/No Checkbox Question POINTBLANK0704 Microsoft Access Getting Started 1 5th Oct 2009 01:06 AM
Checkbox question TotallyConfused Microsoft Excel Programming 6 18th Sep 2009 01:14 PM
Checkbox Question slow386 Microsoft Excel Misc 7 21st Jul 2007 12:06 AM
Master-Detail Datagrid -checkbox (once tick the checkbox, all the child checkbox is ticked) Agnes Microsoft VB .NET 0 16th Aug 2004 11:23 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:09 PM.