Hello all.
I have the following code but it does not work!
Please help me how can i access to a field with a variable keeping Name of that field?
I have the following code but it does not work!
Please help me how can i access to a field with a variable keeping Name of that field?
Code:
PRIVATE SUB ANALYZE(FieldName as string)
dim rst As DAO.Recordset
dim Minval as integer
Dim MyDB As DAO.Database
Set MyDB = CurrentDb
MyDB.OpenRecordset("MyTable",dbOpenDynaset)
rst.MoveFirst
Minval=rst!FieldName <----- Problem is here
'some code here ......
rst.Close
Set rst = Nothing
end sub
Comment