database fields

how can i make reference to a field in a database ?;for example.
I want to compare the actual date with the one that is stored on the field DATE of my table.I am using a dbf table.
enryoAsked:
Who is Participating?
 
samopalConnect With a Mentor Commented:
You have many ways to do this....

For example, in ADO

Dim cn as new ADODB.Connection
Dim rs as new ADODB.Recordset

'First you need to create yourDSN (Control Panel -> ODBC Data Sources)
cn.open "DSN=yourDSN"
rs.open "myTableName",cn

rs.fields(1)
rs(1)
rs.fields("myField")
rs("myfield")
rs!myfield

-all this gives your the refference to the 2nd field in your table named myfield

HTH
0
 
enryoAuthor Commented:
I want to access the table with Data Control
0
 
danlevansCommented:
enryo,

data1.recordset!myfield

contains the data in myfield of the current record in your database using data control.

have fun,

Dan
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.