![]() |
|
|
#1
|
|||
|
|||
|
Dim cmd As ADODB.Command
Dim strQueryText As String cmd.ActiveConnection = CurrentProject.Connection cmd.CommandType = adCmdText strQueryText = "SELECT Store_Profile.SPStoreNo, Store_Profile.SPSiteNo, Contact_Profile.CPExtAcctPhoneNo, Contact_Profile.CPExtAcctFaxNo" strQueryText = strQueryText & "FROM Contact_Profile INNER JOIN Store_Profile ON Contact_Profile.SPStoreNo=Store_Profile.SPStoreNo" & ";" cmd.CommandText = strQueryText cmd.Execute End Sub |
|
#2
|
|||
|
|||
|
Is this a question?
|
|
#3
|
|||
|
|||
|
Maybe you want to get a recordset to save the result of the cmd.execute?
You can define a recordset.(for example, name is rst) set rst=cmd.execute |
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Designing query to select entries with 6 of 9 columns greater than 3 | mrc881 | Queries | 0 | 04-03-2009 11:15 AM |
| Select query for Exponential Moving Average. | krishna79 | Queries | 0 | 01-22-2009 02:52 AM |
| Select query with two criteria | corni | Queries | 1 | 01-22-2009 02:23 AM |
| very difficult (for me!) SELECT query | igorbaldacci | Queries | 1 | 12-02-2008 12:30 PM |
| Using SELECT query within a VBA code in Access | championss | Programming | 4 | 10-23-2006 03:50 PM |