Solved

database fields

Posted on 2000-02-21
3
132 Views
Last Modified: 2010-05-02
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.
0
Comment
Question by:enryo
3 Comments
 
LVL 9

Accepted Solution

by:
samopal earned 70 total points
ID: 2543863
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
 

Author Comment

by:enryo
ID: 2543893
I want to access the table with Data Control
0
 
LVL 2

Expert Comment

by:danlevans
ID: 2559094
enryo,

data1.recordset!myfield

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

have fun,

Dan
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Saving history changes to sub form 4 42
passing parameter in sql procedure 9 61
Sending a email via excel using vba 6 79
MS Access 03, TransferText, decimal places 8 67
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

816 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now