Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can't insert current date into existing record

Status
Not open for further replies.

TSimonick

Technical User
Sep 6, 2001
39
US
Hi Everyone,

All I want to do is insert the current date into an existing record when a form opens. I use: Me![txtOrderDate] = FormatDateTime(Date, vbShortDate) with form event On Activate. Since the record already exists, the Default property doesn't work. I have tried events On Open, Got Focus, etc and none of them work. I have one form where this code works On Activate, but no where else. I cannot find any difference between this form and my other forms, and they are all referencing the same table (through similar queries). So for each record there is a field for Order Date, Receive Date, Use Date, etc.

I would really appreciate any ideas about this problem.

TIA,

Tom

 
Is the AllowEdits property for the form set to "Yes".

Is the Query your Form is bound to updateable. To check this, open the query manually, see if you can type in a date.

If you set the Form's recordsource at runtime is Me![txtOrderDate] = FormatDateTime(Date, vbShortDate) coming after that.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top