Using an "if" statement in an update query

  • Thread starter Thread starter Sue Burns
  • Start date Start date
S

Sue Burns

Hello. I am hoping someone can and will help me. I have
a contacts table that has first name, middle and last name
in it. I also have a column for nickname. I've entered
those nicknames that exist but I want to populate the
blank fields (those folks with no nickname) to be "first
name"

I have tried an if statement and although it says it is
about to update 695 rows, nothing happens.

any thoughts?

Thanks in advance for any assistance you may provide.

Sue at Vermont Law School
 
Place the "first name" field in the updata row of your
query in the nick name column. I think should work. I
apologize if it doesn't. Good luck.
 
Sue,
Give this a try:

Update YourTable
Set [NickName] = [FirstName]
Where [NickName] Is Null
 
Oh thank you Lynn! This worked like a charm. Saved me
lots of work.

Best to you.

Susan Burns
Vermont Law School
-----Original Message-----
Sue,
Give this a try:

Update YourTable
Set [NickName] = [FirstName]
Where [NickName] Is Null

--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm


Sue Burns said:
Hello. I am hoping someone can and will help me. I have
a contacts table that has first name, middle and last name
in it. I also have a column for nickname. I've entered
those nicknames that exist but I want to populate the
blank fields (those folks with no nickname) to be "first
name"

I have tried an if statement and although it says it is
about to update 695 rows, nothing happens.

any thoughts?

Thanks in advance for any assistance you may provide.

Sue at Vermont Law School


.
 
Back
Top