Please support our MS Access and FileMaker Pro advertiser: Programming Forums
![]() |
•
•
Join Date: Nov 2008
Posts: 19
Reputation:
Rep Power: 1
Solved Threads: 0
Hi all,
I have this sql line (below) and where it works fine at the moment. But I have columns with 2 words i.e. opened by. I would like to add this colum to the statement below but everytime i try it errors. Do I have to reword the statement or use special quotes?
Thanks
Martin
I have this sql line (below) and where it works fine at the moment. But I have columns with 2 words i.e. opened by. I would like to add this colum to the statement below but everytime i try it errors. Do I have to reword the statement or use special quotes?
Thanks
Martin
SQLText = "INSERT INTO issues1 ([title], [time], [Opened], [staff], [status], [category], [comment]) SELECT title, time, Opened, staff, status, category, comment " & "FROM issues where (issues.id=" & Me.ID & ")"
Last edited by peter_budo : Dec 3rd, 2008 at 7:17 pm. Reason: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks) and [icode] (inline code) tags.
Can you show us the statement that doesn't work? My first guess would be that you don't have brackets around each of the fields. I see you have brackets in the Insert INTO section of the SQL Statement, but not in the SELECT section of the statement.
•
•
Join Date: Nov 2008
Posts: 19
Reputation:
Rep Power: 1
Solved Threads: 0
The statement above does work. I would have thought that the below would work. All I would do is place the column names in quotes.
SQLText = "INSERT INTO issues1 ("title", "time", "Opened", "opened by", "staff", "status", "category", "comment", "assigned to") SELECT title, time, Opened, opened by, staff, status, category, comment , assigned to" & "FROM issues where (issues.id=" & Me.ID & ")" Last edited by peter_budo : Dec 3rd, 2008 at 7:18 pm. Reason: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks) and [icode] (inline code) tags.
Try this:
SQLText = "INSERT INTO issues1 ([title], [time], [Opened], [opened by], [staff], [status], [category], [comment], [assigned to]) SELECT [title], [time], [Opened], [opened by], [staff], [status], [category], [comment] , [assigned to]" & "FROM issues where (issues.id=" & Me.ID & ")"
![]() |
Similar Threads
Other Threads in the MS Access and FileMaker Pro Forum
- HijackThis Log help, Terrible Virus/Malware (Viruses, Spyware and other Nasties)
- Move actual file DOMDocument() (VB.NET)
- mysql_fetch_array problem (PHP)
- I lack focus... (Java)
Other Threads in the MS Access and FileMaker Pro Forum
- Previous Thread: rest. menu table design
- Next Thread: Expression Builder : MS ACCESS FORMS
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)





Linear Mode