RE: Insert Statement Syntax
- From: Magius96 <Magius96@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 2 Sep 2008 12:15:04 -0700
Nevermind, I found the correct syntax. Here it is incase other people have
the same problem
Public Sub AddValues()
Dim strString As String
strString = "INSERT INTO import(Agency, Regular, AWG, Rehab, FFEL, FDSLP,
Direct) SELECT "
strString = strString & Agency & " as Agency, " & Regular & " as Regular,"
& AWG & " as AWG," & Rehab
strString = strString & " as Rehab," & FFEL & " as FFEL," & FDSLP & " as
FDSLP," & Direct & " as Direct"
DoCmd.RunSQL strString
End Sub
"Klatuu" wrote:
doesn't work in Access doesn't give us much to go on. Please describe the.
problem.
--
Dave Hargis, Microsoft Access MVP
"Magius96" wrote:
Coming from MySQL to Access, I realize there are some syntax differences.
The following code works in MySQL, but doesn't work in Access. What's the
correct syntax for the SQL string?
Public Sub AddValues()
Dim strString As String
strString = "Insert into [import] set [Agency]='" & Agency & "',
[Regular]=" & Regular & ", [AWG]=" & AWG
strString = strString & ", [Rehab]=" & Rehab & ", [FFEL]=" & FFEL & ",
[FDSLP]=" & FDSLP & ", [Direct]=" & Direct
DoCmd.RunSQL strString
End Sub
- Follow-Ups:
- RE: Insert Statement Syntax
- From: Magius96
- RE: Insert Statement Syntax
- Prev by Date: Reset Statusbar Text
- Next by Date: RE: Insert Statement Syntax
- Previous by thread: Reset Statusbar Text
- Next by thread: RE: Insert Statement Syntax
- Index(es):
Relevant Pages
|