MySql question

bonekrusher

Registered User.
Local time
Today, 07:09
Joined
Nov 19, 2005
Messages
266
Hi All,

I am trying to learn sequel strings and I have a question. How do i extract the value from this sql statement? Thanks!

Code:
Dim myconnection As ADODB.Connection
Dim myrecordset As New ADODB.Recordset
Set myconnection = CurrentProject.Connection

    myrecordset.ActiveConnection = myconnection
Dim answer As String
Dim mysql As String
    mysql = "SELECT Table1.Name, Table1.eMAIL FROM Table1 WHERE (([Table1]![Name]='jdoe'))"
 
if you put the query in the recordset you can get the fields


myrecordset.open "SELECT Table1.Name, Table1.eMAIL FROM Table1 WHERE (([Table1]![Name]='jdoe'))"

myrecordset("name") -> gives you the name
myrecordset("eMAIL") -> gives you the email

i thonk yhis works for you
 
Thanks! Works great. This help out a lot.

Bones
 

Users who are viewing this thread

Back
Top Bottom