how to replace fields

  • Thread starter Thread starter Mary
  • Start date Start date
M

Mary

Hi all,

I am new to Ms access, would like to know how to replace fields with some
specific values, i.e. want to replace all records with a field named MONTH
by "May".

What should I do? Thanks.
 
Mary

Month is a reserved word in access (actually it is the name of an Access
function), and it is advisable not to name your fields with the name of
Access reserved words. It is also easier to remember what Month means if you
give is a more descriptive name like PurchaseMonth or something like that.

You need to create an update query.
1. Open a new query and select the table you want to modify.
2. Select the [Month] field and add it to the grid
3. From the main menu, select Query -> Update Query. This will add an
"Update to" row to the query gird.
4. Type "May" in the box that corresponds to your Month field and the
Update to row.
5. run your query

I would question why you need the Month field if all of the value in the
field are going to be May.

HTH
Dale
 
thanks a lot, will change the field name as advised.

I am just rewritting some Visual Fox-pro programs by Ms Access as our copy
of VFP is in very low version that our PC can't support.

The purpose of the program I am studying is to import some monthly report
data and append to a master file. That's why we have to replace the newly
added records by the current month value in order to differentiate them from
the history records.

Dale Fye said:
Mary

Month is a reserved word in access (actually it is the name of an Access
function), and it is advisable not to name your fields with the name of
Access reserved words. It is also easier to remember what Month means if
you
give is a more descriptive name like PurchaseMonth or something like that.

You need to create an update query.
1. Open a new query and select the table you want to modify.
2. Select the [Month] field and add it to the grid
3. From the main menu, select Query -> Update Query. This will add an
"Update to" row to the query gird.
4. Type "May" in the box that corresponds to your Month field and the
Update to row.
5. run your query

I would question why you need the Month field if all of the value in the
field are going to be May.

HTH
Dale

--
Email address is not valid.
Please reply to newsgroup only.


Mary said:
Hi all,

I am new to Ms access, would like to know how to replace fields with some
specific values, i.e. want to replace all records with a field named
MONTH
by "May".

What should I do? Thanks.
 
Back
Top