form can't see data

BBRAZEAU

New member
Local time
Today, 22:02
Joined
Aug 14, 2001
Messages
7
I have a button on a form with code that accesses data from the table it reads using the Me key word.I've added a new field to the table but when I try to accesss the data in the form button code I get error Method or data member not found. How can I access this data from the form without putting another text box on the form showing the field? any help would be appreciated.
 
I'm new to this, but I have forms which do this, using Recordset.

If I get you right, you want to access the field in the table without adding the corresponding field into the table?

You'll need something like:
Dim db As DAO.Database
Dim rs As DAO.Recordset
Set db = CurrentDb()
Set rs = db.OpenRecordset("YourTable")
msgbox("Your data is: " & rs!YourField)

Is this the kind of thing you're looking for?
 
Thanks this is exactly what I'm looking for.
 

Users who are viewing this thread

Back
Top Bottom