checkbox question

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

Guest

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.
 
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.
 
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 said:
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.
 
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

(no private e-mails, please)


Todd said:
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 said:
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.
 
thanks... it works perfectly now.

Douglas J. Steele said:
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

(no private e-mails, please)


Todd said:
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 said:
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.
 
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 said:
thanks... it works perfectly now.

Douglas J. Steele said:
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

(no private e-mails, please)


Todd said:
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.'.

:

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.
 
Back
Top