starrcruise
Registered User.
- Local time
- Yesterday, 21:29
- Joined
- Mar 4, 2011
- Messages
- 18
I give up. Two questions (I'm using Access 2007). One, would you please give me the correct syntax for the below UPDATE code. I am getting a "missing operator" on the WHERE statement. Criteria fields are both text.
("UPDATE [policy changes] SET [Policy Changes].[Legislation ID]=" & Me.SourceID _
& "WHERE [Policy Changes].[ChangeControlNo]='" & Me.cboBulletinNumber & "'")
Secondly - I wanted to make the whole update code a string so I could just put: DoCmd.RunSql (sqlPol)
But I am not getting the correct syntax on that as in:
sqlPol = "UPDATE [Policy Changes] SET " & _
"Policy_Changes.Legislation_ID=" & Me.SourceID & _
"WHERE [Policy Changes].[ChangeControlNo] ='" & Me.cboBulletinNumber & "'"";"
As you can see, I'm not the brightest light bulb on this stuff. Thank you.
("UPDATE [policy changes] SET [Policy Changes].[Legislation ID]=" & Me.SourceID _
& "WHERE [Policy Changes].[ChangeControlNo]='" & Me.cboBulletinNumber & "'")
Secondly - I wanted to make the whole update code a string so I could just put: DoCmd.RunSql (sqlPol)
But I am not getting the correct syntax on that as in:
sqlPol = "UPDATE [Policy Changes] SET " & _
"Policy_Changes.Legislation_ID=" & Me.SourceID & _
"WHERE [Policy Changes].[ChangeControlNo] ='" & Me.cboBulletinNumber & "'"";"
As you can see, I'm not the brightest light bulb on this stuff. Thank you.