Recordset error

cdahrens
04-17-2004, 12:23 PM
When I try to view a field I get the following error, "Item cannot be found in the collection corresponding to the requested name or ordinal"

I used the wizard to write this code.

Dim db As Connection
Set db = New Connection
db.CursorLocation = adUseClient
db.Open "PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source=" & gStrDb & ";"

Set adoPrimaryRS = New Recordset
adoPrimaryRS.Open "select Name,PhoneNum,FaxNum,WebPage,Address,Address2,City,State,Zip,BillAddre ss,BillAddress2,BillCity,BillState,BillZip,FedAccNum,FedUsrName,FedPas sword,UPSAccNum,UPSUsrName,UPSPassword from Client", db, adOpenStatic, adLockOptimistic

I get the error when trying something like this.

str = CStr(adoPrimaryRS!ClientID)

I am thinking that the recordset may need to be set up differently.

Shurik12
04-17-2004, 01:58 PM
I can't see a field called ClientID in the recordset you're opening, no wonder
it can't be found.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum