On my Form I have a Combo box and a check box. I want the combo box to show
today's date if Check box is True!
Thanks for any Help....Bob
Set the Control Source of the combo to:
=IIf(([MyCheckBox]), Date(), Null)
It's unusual to use a combo to display a date like that, so I suspect I have
not understood your question correctly.

Signature
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
> On my Form I have a Combo box and a check box. I want the combo box to
> show today's date if Check box is True!
> Thanks for any Help....Bob
Bob V - 24 Jan 2008 08:53 GMT
Thanks Allen I will change it to a Text Box???.............Thanks Bob
> Set the Control Source of the combo to:
> =IIf(([MyCheckBox]), Date(), Null)
[quoted text clipped - 5 lines]
>> show today's date if Check box is True!
>> Thanks for any Help....Bob
"Bob V" <rjvance@ihug.co.nz> a écrit dans le message de groupe de discussion
: eSNl8AmXIHA.5164@TK2MSFTNGP03.phx.gbl...
> On my Form I have a Combo box and a check box. I want the combo box to
> show today's date if Check box is True!
> Thanks for any Help....Bob
Blackstar - 04 May 2008 19:56 GMT
Private Sub chkbox_AfterUpdate()
If Me.chkbox = -1 Then
Me.combobox.Value = Date
Else
Me.combobox.Value = ""
End If
End Sub
instead of date you could also use Now ()
It is as you please.
Didier
Douglas J. Steele - 04 May 2008 20:08 GMT
Except that Now includes both date and time.
Date and Now are NOT interchangable in meaning.

Signature
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)
> Private Sub chkbox_AfterUpdate()
> If Me.chkbox = -1 Then
[quoted text clipped - 9 lines]
>
> Didier