Not a Member Yet,
Click here to Register

ID: 312
Viewed: 3602
Added: Aug 19, 2002
Snippet uploaded by: snippet
Written By: Unknown
Demo: Sorry, no demo

User Rated at: 0 Stars
Rate This:

Thank you for your vote. Please wait...

It appears you already voted for this snippet

It appears your vote value was empty

Open database with code & SQL

Highlight all by clicking in box

Highlight All
'Example code
'gvDataPath is Global variable for Data Path
'stored/retrieved from ini file

'Open Table with code
Dim cDBName As String ' database name
Dim dbName As Database ' database object
cDBName = gvDataPath + "test.mdb"
Set dbName = OpenDatabase(cDBName)

'SQL to get Find Thing in Test Table
Dim SelectString As String
SelectString = "Select * from Test where [Name]= " & "'" & "Thing" & "'"
Dim rsName As Recordset
Set rsName = dbName.OpenRecordset(SelectString)

'Copy fields to variables
Dim Name As String
Name = rsName.Fields("Name");

No Comments to show

Please completely fill out the form below if you want to review this snippet. All reviews are subject to validation.

Replying to a Comment...

Adding your comment. Please wait...

Thanks for adding your comment!. After further review it will be added.

There was a problem adding your comment. Please try again.

Please complete all the fields in the form before sending.

© 2002 - 2024 All Rights Reserved. Conditions
Do NOT follow this link or you will be banned from the site!