Retrieve value from RecordSets

irade92

Registered User.
Local time
Today, 22:04
Joined
Dec 26, 2010
Messages
229
Dim rst As ADODB.Recordset
Set rst = New ADODB.Recordset

rst.ActiveConnection = CurrentProject.Connection
rst.CursorType = adOpenStatic
rst.LockType = adLockOptimistic
rst.Open "Select * from tblFAKTURI ORDER BY FAKTURA"



Dim rDATUM As Date

rDATUM = rst("DATUM")

Why I can't retrieve value from rst to a variable..like in this example
I need to perform further manipulation with variable rDATUM

I can retrieve with DAO but not with ADO..Why?
 
Last edited:
What's happening exactly? Are you getting an error message? Or is the code running and nothing is being assigned to rDATUM?

Have you checked that there is a value for rDATUM?

What happens if you put this in at the end of your code:
Code:
MsgBox rst("FAKTURA")

hth
Chris
 
Code:
dim rst as DAO.recordst
Dim rDATUM As Date

set rst = CurrentDB.OpenRecordset("YourTable")
rst.movefirst
rDATUM = rst("DATUM")
rst.close
set rst = Nothing
 

Users who are viewing this thread

Back
Top Bottom