Brookelyn
The Trying One
- Local time
- Today, 13:01
- Joined
- Jan 24, 2006
- Messages
- 14
The following code gives me a syntax error in the INSERT INTO statement. I can't see the problem with it considering it pretty much looks just like my other sql string. Can anyone else see the problem? I'm sure it's right under my nose and I've just been looking at it too long. When I hit debug it highlights the line DoCmd.RunSQL (SQLarchive).
Dim ftrBrand As String
ftrBrand = ""
ftrBrand = InputBox("Enter Brand Name", "Brand Name")
Dim SQLarchive As String
SQLarchive = "INSERT INTO [FilteredTable]" & _
"SELECT [Store Data].*, FROM [Store Data] WHERE [Store Data].Brand = ftrBrand"
DoCmd.RunSQL (SQLarchive)
Thank you
Dim ftrBrand As String
ftrBrand = ""
ftrBrand = InputBox("Enter Brand Name", "Brand Name")
Dim SQLarchive As String
SQLarchive = "INSERT INTO [FilteredTable]" & _
"SELECT [Store Data].*, FROM [Store Data] WHERE [Store Data].Brand = ftrBrand"
DoCmd.RunSQL (SQLarchive)
Thank you