Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms / November 2006

Tip: Looking for answers? Try searching our database.

Validate

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Sooner - 08 Nov 2006 18:56 GMT
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
Matt - 08 Nov 2006 19:57 GMT
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
Sooner - 10 Nov 2006 17:00 GMT
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
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.