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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|