Psycholicon
Registered User.
- Local time
- Today, 04:36
- Joined
- Aug 14, 2007
- Messages
- 33
Hi everybody,
What am I doing wrong with this statement?
DoCmd.RunSQL "UPDATE [Drawing Log] SET [Current Revision] = & "'CurrentRevision'" & " WHERE [Drawing Number] =" & "[Forms]![DCNs]![DCN Details Subform]![Drawing Number]"
I have a form that displays records about drawings and I want to be able to update the revision level of one when it's necessary. I need it to move a letter up, so I have a command button that looks up the current revision level and assigns that as a string, then it runs code to level up the revision and reassign the new letter as the string. Then I wrote a statement that (theoretically) updates the master table. The criteria is that the record be for the drawing currently being viewed, which is found in a control on the form. However, when I click the button, it insters "CurrentRevision" into the Table instead of the next letter (which means that it looks up the record correctly). I have tried changing the arrangement of quotations but all changes have either not fixed it or made it worse.
Thanks in advance
Derek
What am I doing wrong with this statement?
DoCmd.RunSQL "UPDATE [Drawing Log] SET [Current Revision] = & "'CurrentRevision'" & " WHERE [Drawing Number] =" & "[Forms]![DCNs]![DCN Details Subform]![Drawing Number]"
I have a form that displays records about drawings and I want to be able to update the revision level of one when it's necessary. I need it to move a letter up, so I have a command button that looks up the current revision level and assigns that as a string, then it runs code to level up the revision and reassign the new letter as the string. Then I wrote a statement that (theoretically) updates the master table. The criteria is that the record be for the drawing currently being viewed, which is found in a control on the form. However, when I click the button, it insters "CurrentRevision" into the Table instead of the next letter (which means that it looks up the record correctly). I have tried changing the arrangement of quotations but all changes have either not fixed it or made it worse.
Thanks in advance
Derek