A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Explain a yes/no check



 
 
Thread Tools Display Modes
  #1  
Old May 6th, 2009, 06:56 PM posted to microsoft.public.access
R. McMichael
external usenet poster
 
Posts: 1
Default Explain a yes/no check

I have a yes/no field. When YES is marked, I want to force and explanation.
How do I do this?
  #2  
Old May 6th, 2009, 07:42 PM posted to microsoft.public.access
Al Campagna[_2_]
external usenet poster
 
Posts: 1,462
Default Explain a yes/no check

McMichael,
A bit more information about your check field, and the
"explanantion" you want to update would have been useful.
Sounds like you want to "force an explanation."

Given a Boolean bound check control (ex. name chkTrueFalse)
with a label (ex. name lblTrueFalse)
Use the AfterUpdate of your checkbox (ex. name lblTrueFalse)

Private Sub chkTrueFalse_AfterUpdate()
If chkTrueFalse = True Then
lblTrueFalse.caption = "True"
Else
lblTrueFalse.caption = "False"
End if
End Sub

You'll also need to add this same code to the form's OnCurrent Event,
so the label will change (appropriately) as you browse from
on record to another.
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."

"R. McMichael" R. wrote in message
news
I have a yes/no field. When YES is marked, I want to force and
explanation.
How do I do this?



  #3  
Old May 6th, 2009, 07:49 PM posted to microsoft.public.access
Jeff Boyce
external usenet poster
 
Posts: 8,621
Default Explain a yes/no check

If, by "force an explanation", you mean require the user to add an
explanation in a text control near the checkbox, you might use something
like (untested -- substitute your own control names):

If Me!chkYourCheckbox = True Then
Me!txtYourExplanation.Enabled = True
Elseif Me!chkYourCheckbox = False Then
Me!txtYourExplanation = Null
Me!txtYourExplanation.Enabled = False
End If

Good luck!

Regards

Jeff Boyce
Microsoft Office/Access MVP


"R. McMichael" R. wrote in message
news
I have a yes/no field. When YES is marked, I want to force and
explanation.
How do I do this?



 




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 07:20 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.