Method or data member not found

J

JeffT

I want to keep other users from changing data in a field but allow edits to
other fields. I found the following code here and thought it would work
however I keep getting the method or data member not found message. What am I
missing. I've made sure DAO 3.6 is checked in the references.

Here is the code I'm using:

Private Sub Form_Current()

Dim db As DAO.Database
Dim Rs As DAO.Recordset

Me.ASONumber.Locked = Not Me.NewRecord

End Sub
 
J

JeffT

Yes, I've been to the site, tried everything.

The two Dim statements were left over from another attempt at fixing. I've
removed them and am back at my original code which follows:

Private Sub Form_Current()

Me.ASONumber.Locked = Not Me.NewRecord

It is the .Locked = that is highlighted after the message.

Thanks
 
R

ruralguy via AccessMonster.com

This may be a stupid question but you do have a TextBox control named
ASONumber, correct?
Yes, I've been to the site, tried everything.

The two Dim statements were left over from another attempt at fixing. I've
removed them and am back at my original code which follows:

Private Sub Form_Current()

Me.ASONumber.Locked = Not Me.NewRecord

It is the .Locked = that is highlighted after the message.

Thanks
It still sounds like a Reference problem. Maybe something in this link will
help.
[quoted text clipped - 17 lines]
 
J

JeffT

Whoa! My bad, it's named ASO. How stupid of me. Thanks for all your help.

ruralguy via AccessMonster.com said:
This may be a stupid question but you do have a TextBox control named
ASONumber, correct?
Yes, I've been to the site, tried everything.

The two Dim statements were left over from another attempt at fixing. I've
removed them and am back at my original code which follows:

Private Sub Form_Current()

Me.ASONumber.Locked = Not Me.NewRecord

It is the .Locked = that is highlighted after the message.

Thanks
It still sounds like a Reference problem. Maybe something in this link will
help.
[quoted text clipped - 17 lines]
 
R

ruralguy via AccessMonster.com

Glad I could help.
Whoa! My bad, it's named ASO. How stupid of me. Thanks for all your help.
This may be a stupid question but you do have a TextBox control named
ASONumber, correct?
[quoted text clipped - 17 lines]
 

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