I have a field set with a Data Type of Yes/No. I am using a combo box to to
check. If checked i would like the another field populated with todays date.
I have tried several ways to get this to populate unsuccessfully. I have
used the on update box as well as others to check for yes/no in field 1 to no
avail.
Any suggestions?
Thanks
Add VBA Code to the AfterUpdate Event of the Combo Box.
Private Sub YourCombobox_AfterUpdate()
If Me.YourCheckBox Then Me.YourDateField = Date
End Sub

Signature
-Matt
Microsoft Certified Professional
> I have a field set with a Data Type of Yes/No. I am using a combo box to to
> check. If checked i would like the another field populated with todays date.
[quoted text clipped - 5 lines]
>
> Thanks
I was unable to get the code below to work, so it was suggested that I run
the following macro. It is in the afterupdate on the check box field
Item [Forms]![Notes Tracking]![Resolve Date]
Expression IIf([Forms]![Notes
Tracking]![Resolve]=No,Null,[Forms]![Notes Tracking]![Resolve Date]=[Date])
The following is the error I receive.
The object doesn't contain the Automation object 'Date'.
> I have a field set with a Data Type of Yes/No. I am using a combo box to to
> check. If checked i would like the another field populated with todays date.
[quoted text clipped - 5 lines]
>
> Thanks
Matt - 10 Nov 2006 17:09 GMT
Try changing the Expression to:
IIf([Forms]![Notes > Tracking]![Resolve]=False,Null,[Forms]![Notes
Tracking]![Resolve Date]=Date())

Signature
-Matt
Microsoft Certified Professional
> I was unable to get the code below to work, so it was suggested that I run
> the following macro. It is in the afterupdate on the check box field
[quoted text clipped - 16 lines]
> >
> > Thanks
Sooner - 10 Nov 2006 21:09 GMT
Thanks
One last issue. The problem I am having now is that if I check the box for
resolve it will not populate the date. If I input a date with a check in the
field then remove the check to will null the date field.
> Try changing the Expression to:
>
[quoted text clipped - 21 lines]
> > >
> > > Thanks
Matt - 10 Nov 2006 22:12 GMT
You should be calling the Macro on the AfterUdate event of the checkbox.

Signature
-Matt
Microsoft Certified Professional
> Thanks
>
[quoted text clipped - 27 lines]
> > > >
> > > > Thanks
Sooner - 13 Nov 2006 17:37 GMT
That is where I am calling it.
The other thing that I get is if I put a date in and go back to that screen
it will be populated with a year of 1899. This will only happen the first
tme.
> You should be calling the Macro on the AfterUdate event of the checkbox.
>
[quoted text clipped - 29 lines]
> > > > >
> > > > > Thanks