Field Edit

  • Thread starter Thread starter Jessie
  • Start date Start date
J

Jessie

hello.
I have been trying to figure out a way to update fields
programmatically
based on criteria. This is a step in the right direction.
Can you help me
with the code that I would use if I want to Update fields
that are populated
to another value.
For Example if it is a 15 it needs to be converted to W if
it is Null it
needs to be converted to N. That sort of thing

Right now I have 15 different Queries that accomplish the
task, but would
like to find some way to do it in code to save the hassle
of writing the
queries.

Any help you can give would be terrific.

thanks,
Jessie
 
First, the field will have to be defined as a text field if you want to
convert from a number to a letter code.

One simple way to handle this is to set up a separate table with the
correspondence between numbers and letters, join it with the original table
in a query, convert the query to an update query and update to the value
"looked up" in the second table.

There are other ways, if that is for some reason, not usable in your
environment. If you need to follow up or clarify, please do so here in the
newsgroup, not by e-mail.

Larry Linson
Microsoft Access MVP
 
Back
Top