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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Run-Time Error 2950

Status
Not open for further replies.
Dec 23, 2004
33
US
I get this error "Run-time Error 2950 Reserved Error" when I try to use Dlookup to retrieve a value from a table in access.
-------

Set dbl = OpenDatabase(GetDataBase())
wsTable.range("A1") = DLookup("AYRQ", "[State and Year Table]")
--------

It works fine if I use the following:

STR = " SELECT AYRQ" _
& " FROM [State and Year Table]"

Set rst = dbl.OpenRecordset(STR, dbOpenSnapshot)
wsTable.Range("A1").CopyFromRecordset rst

Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top