Last Updated Compile Error

dax1226

Registered User.
Local time
Today, 12:27
Joined
Dec 21, 2007
Messages
16
Currently I have a field setup on my form and hidden. I have inputted the code me.txtDate_updated=now() to assign the date that the field was updated.

However, now whenever I access the form I receive a Compile error stating "Method or data member not found"

Anyone have an idea as to what might be causing this?
 
I have it setup in the after update code.

date_updated is setup as the field on my form and is hidden - It is tied to the correct field I am updating on the table.
 
Have you checked for bogus MISSING references? Your code should be in the BeforeUpdate event of the form.
 
is the compiler stopping on the now() function?

as RG says, if so, this is generally a reference problem
 
No, getting it when I exit the fields to save the data.

The function is:
Private Sub Form_BeforeUpdate(Cancel As Integer)
Me.txtUpdated = fOSUserName
Me.txtDate_Updated = Now()
End Sub

Without Me.txtDate_Updated = Now() there is no problem
 
I'm confused!

is the compiler stopping on the now() function? as RG says, if so, this is generally a reference problem

No, getting it when I exit the fields to save the data... Without Me.txtDate_Updated = Now() there is no problem

You first say "No" to the question "is the compiler stopping on the now() function?" and then say "Without Me.txtDate_Updated = Now() there is no problem."

It certainly sounds as if the problem is with the Now() function.
 
date_updated is setup as the field on my form and is hidden - It is tied to the correct field I am updating on the table.

Me.txtDate_Updated = Now()


is it date_updated or txtdate_updated

you need the name of the hidden textbox, not the name of the field in the table
 
is it date_updated or txtdate_updated

you need the name of the hidden textbox, not the name of the field in the table

Ouch...I feel ridiculous. :eek:

Thank you very much, I went in and realized I had not renamed the hidden textbox. Thank you :o
 

Users who are viewing this thread

Back
Top Bottom