Show Date Question

B

Bob V

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
 
A

Allen Browne

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.
 
B

Bob V

Thanks Allen I will change it to a Text Box???.............Thanks Bob

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

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

Bob V said:
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
 
E

ENGLER FREDERIC

Bob V said:
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
 
B

Blackstar

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
 
D

Douglas J. Steele

Except that Now includes both date and time.

Date and Now are NOT interchangable in meaning.
 
Top