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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I have a field in my database that

Status
Not open for further replies.

InsaneProgrammer

Programmer
Jan 17, 2001
44
US
I have a field in my database that defaults to todays date. I use =Date() in the fields default value. The field has not had any problems since I created this database 9 months ago. All of a sudden the field began displaying #Name? when you go to a new record. As soon as you type something it goes away and correctly shows the date. I haven't changed anything in the database. Does anyone have an idea on how to fix this? If I use Now() the problem goes away but I don't want the time. The time screws up all of my queries and reports.
 
You can always set it =Format(Now(), "Short Date")

Also look at your References. See if any are marked *MISSING*.
 
I used =Format(Now(), "Short Date") as you suggested and it caused an error. I had to take out the = sign. After that it still displayed #Name?. I looked at the References and none are missing.



 
I have experienced the same problem sometimes. And usually the problem seems to have occured because of an error somewhere else in the code. So maybe you have an error somewhere in your code. Try to compile your code first.
 
Here's another choice for all to test:
Control Source or Default Value: =Now()
Format: Short Date
worth a try....! Gord
ghubbell@total.net
 
Also, check for name collisions. Especially, if you have a control named Date, change it to something else.

I tended to have this sort of problem when I used field names as control names, most commonly naming a control Name. Nowadays I always use a control name prefix that identifies the type of control. It makes the code easier to follow, too. Rick Sprague
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top