Have a form ope to the current date

  • Thread starter Thread starter Debbie
  • Start date Start date
D

Debbie

I have a database that is used to track time spent on
projects. It is a multiuser db.
I created a date table that I have the date in until
1/1/2004. When the user opens the form to input data it
opens to the first record. I am trying to get it to open
to the current date. I am not having any luck it seems as
if this one should be easy. But it is totally frustrating
because I can not seem to figure it out.

I have a subform on this form.


Thanks in advance for any help with this. It would be nice
to know if I am doing something wrong or if I am trying to
do somethihng that is impossible.

Debbie
 
In the OnLoad event of the form try:

Me.Recordset.FindFirst "[DateField] = " & Date
or
Me.Recordset.FindFirst "[DateField] = #" & Date & "#"
 
Hi Debbie,

Please refer to Wayne's good suggestion and feel free to let us know if you
have any questions or concerns.


Sincerely,

Alick Ye, MCSD
Product Support Services
Microsoft Corporation
Get Secure! - <www.microsoft.com/security>

This posting is provided "AS IS" with no warranties, and confers no rights.


--------------------
| Content-Class: urn:content-classes:message
| From: "Debbie" <[email protected]>
| X-Tomcat-NG: microsoft.public.access.forms
|
| I have a database that is used to track time spent on
| projects. It is a multiuser db.
| I created a date table that I have the date in until
| 1/1/2004. When the user opens the form to input data it
| opens to the first record. I am trying to get it to open
| to the current date. I am not having any luck it seems as
| if this one should be easy. But it is totally frustrating
| because I can not seem to figure it out.
|
| I have a subform on this form.
|
|
| Thanks in advance for any help with this. It would be nice
| to know if I am doing something wrong or if I am trying to
| do somethihng that is impossible.
|
| Debbie
|
 
Back
Top