J
Jonas
I am trying to use VBA and SQL but I can't seem to get it to work.
Below is some code I have found doesn't work. I looked all over the
internet for an answer and in a couple of books that I have been using.
The book presents the subject as though I should just be able to put
the SQL statements with some modifications to the right of DoCMD.RunSQL
and run the query from the VBA editor. Any suggestions that you could
give would be much appreciated. I'm going nuts.
Sub testme()
Dim strQry As String
strQry = "SELECT Contacts.First, Contacts.Last, Contacts.Title,
Contacts.Company FROM Contacts"
DoCmd.OpenQuery strQry
End Sub
Below is some code I have found doesn't work. I looked all over the
internet for an answer and in a couple of books that I have been using.
The book presents the subject as though I should just be able to put
the SQL statements with some modifications to the right of DoCMD.RunSQL
and run the query from the VBA editor. Any suggestions that you could
give would be much appreciated. I'm going nuts.
Sub testme()
Dim strQry As String
strQry = "SELECT Contacts.First, Contacts.Last, Contacts.Title,
Contacts.Company FROM Contacts"
DoCmd.OpenQuery strQry
End Sub