Form Field properties not recognized in Field-Object?

I

insomniux

Hi,

Here some code (in BeforeUpdate event in a form):
Dim MyField as Field
Set MyField = Me.TestField 'This is the name of a field on my form
If MyField.OldValue > 100 Then ....

MsAccess (2000) complains that the property .OldValue cannot be found

However when I use the code
If Me.TestField.OldValue > 100 Then ....
There is no complaining.

Is this a bug? How can it be solved?
Thanks
Mike
 
D

Dirk Goldgar

insomniux said:
Hi,

Here some code (in BeforeUpdate event in a form):
Dim MyField as Field
Set MyField = Me.TestField 'This is the name of a field on my form
If MyField.OldValue > 100 Then ....

MsAccess (2000) complains that the property .OldValue cannot be found

However when I use the code
If Me.TestField.OldValue > 100 Then ....
There is no complaining.


Answered in the .modulesdaovba newsgroup.
 
Y

yuyuyuuyuiiu

insomniux said:
Hi,

Here some code (in BeforeUpdate event in a form):
Dim MyField as Field
Set MyField = Me.TestField 'This is the name of a field on my form
If MyField.OldValue > 100 Then ....

MsAccess (2000) complains that the property .OldValue cannot be found

However when I use the code
If Me.TestField.OldValue > 100 Then ....
There is no complaining.

Is this a bug? How can it be solved?
Thanks
Mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top