Cogivina2004
MIS
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.
-------
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.