Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problems with Data controls

Status
Not open for further replies.

EnCocytus

Programmer
Dec 18, 2002
24
US
I've been trying to straighten this bug for a couple days now, and I can't figure out what is wrong.
It's probably something simply. What I've been trying to do is have a Data control named tempData that will open
an Access database file I've created earlier in the program. And add some records to it.
Code:
    tempData.DatabaseName = App.path & "\temp.mdb"
    tempData.Refresh
    tempData.Recordset.AddNew
But whenever I run the code, I get an error message at addNew

"run-time error '91': Object variable not set"

Is there something I have to do to tempData before I can add records to it? 1001100 1110101 1101011 1100101
 
Nevermind, I think I figured out what was wrong. I never defined a record source (oh man, what a day). Anyways, it works now. I am still interested in a good tutorial on ADO controls if anyone knows of one of the top of their heads.

Thanks 1001100 1110101 1101011 1100101
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top