TextBox #Name? Error

suradj

Registered User.
Local time
Today, 14:04
Joined
May 5, 2010
Messages
21
Friends,

I have a textbox in my for with in the controlsource this: =DateDiff("d",[HireDate],Now()).

When i open the form i get the error: #Name?

After reopening the database many times is see the values.

Please help.
 
Try replacing Now() with Date()
 
I want the date difference between the hiredate and the date of today.
So if i open the database after Xdays it must use dateX.

Any other option friend?
 
Suradj,

The "date of today" is returned by the Date() function, so in that sense PNGBill is quite correct.

However this is not going to explain the #Name? error.

Can you confirm that the name of the field in your table is HireDate with correct spelling? And that the HireDate field is included in the form's Record Source table/query? Can you also tell us what is the name of the textbox where you have entered this DateDiff expression?
 
Steve,

Yes the name in the table is Hiredate
Name of the textbox is txt328.

I made i copy of the database end if i open the copy i am not getting any #Name?.

I reopend the database mostly 10 times and now its working.

But the error is not solved!

Ps: I tried date() in another database and this is working. thnx
 
Whenever I see this error in my text box, it usually means that the "Control Source" for that text box is not set to the correct column header in the underlying table. You might want to try checking that.
 

Users who are viewing this thread

Back
Top Bottom