Update Record

wschian

Registered User.
Local time
Today, 14:33
Joined
Dec 12, 2013
Messages
19
Hello,:):)
I had made a simple access file using update statement but i dont know why can not work,
Example of my table

Grade Code Country
1 X MAL
2 X UK
3 X US
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

I want to update my table record as

Grade Code Country
1 X MAL
5 Y UK
3 X US
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

i create a "buttom" with Code Buider and write a following

Private Sub Command0_Click()
Update Orders
SET Grade='5', code='Y'
WHERE County='UK';

End Sub

>>>>>>>>>>>>>>>>>>>

every can help me?
 
Well, to do it how you're trying to:

CurrentDb.Execute "Update Orders SET Grade='5', code='Y' WHERE County='UK'"

Which assumes Grade is a text field.
 
THANKS. it work:):)
 
Now that we've got it working, WHY are you doing it that way? Class assignment?
 
i want to made a own Point OF Sales (POS) system using access
 
Happy to help, and welcome to the site by the way! As David implies, I doubt a real life db would work that way. I assumed it was a learning exercise.
 

Users who are viewing this thread

Back
Top Bottom