Update Query SQL Help

G

Guest

I am getting stuck on the SQL code to do this.

What I want to do is Prompt a user for input a value for "City" on table
"Shipping" and update the field City on table shipping to this new value.

there is an ID feild that will always be set to 1.

any help?
 
G

Gary Walter

"Bombay"wrote:
I am getting stuck on the SQL code to do this.

What I want to do is Prompt a user for input a value for "City" on table
"Shipping" and update the field City on table shipping to this new value.

there is an ID feild that will always be set to 1.

any help?

Not enough details, but in a general sense
I think you could try something like

UPDATE
TABLE Shipping
SET City = [Enter New City]
WHERE
ID = 1;

Something like this should really done
through a form that asks the user, then
you can test in code for valid entry (or
user chooses city from a combo box
so you control what can be entered)...

then, you create the SQL in code using
form value, then execute update query...

good luck,

gary
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top