Villarreal68
Registered User.
- Local time
- Today, 05:40
- Joined
- Feb 15, 2007
- Messages
- 133
Hello Everyone,
I have the following code that I think is good, but does not seem to work:
When i click on the button that runs it, nothing happens. I check the table that should get affected, and the updates don't get applied.
Could a new set of eyes check it and see if you can see what is missing or wrong?
The table name is: PubStatus
The field I'm trying to update is: PubCode
The Field I'm calling on is: PubStatusID
I feel it should work but it just doesn't. Any help would be appreciated.
Thanks!
René
I have the following code that I think is good, but does not seem to work:
Code:
Dim db As Database
Set db = CurrentDb
db.Execute ("UPDATE PubStatus SET [PubCode]='" & PUB & "' WHERE [PubStatusID]=" & 1 & ";")
db.Execute ("UPDATE PubStatus SET [PubCode]='" & AUX & "' WHERE [PubStatusID]=" & 2 & ";")
db.Execute ("UPDATE PubStatus SET [PubCode]='" & REG & "' WHERE [PubStatusID]=" & 3 & ";")
db.Execute ("UPDATE PubStatus SET [PubCode]='" & ESP & "' WHERE [PubStatusID]=" & 4 & ";")
db.Close
Set db = Nothing
When i click on the button that runs it, nothing happens. I check the table that should get affected, and the updates don't get applied.
Could a new set of eyes check it and see if you can see what is missing or wrong?
The table name is: PubStatus
The field I'm trying to update is: PubCode
The Field I'm calling on is: PubStatusID
I feel it should work but it just doesn't. Any help would be appreciated.
Thanks!
René