update a field

G

Guest

Is it programmatically possible to update a field in a table? I have a
single table with 2 fields. 1 field is "group" and the second field is
"branch". There is a single record in this field. These fields contain the
version number. As we release new versions I need to update the database for
each cost center. I would like a way to do this in a macro instead of going
in each database to change the version number.

Any help getting started would be appreciated. Thanks for the help....
 
J

J_Goddard via AccessMonster.com

Hi -

The description of your table seems strange. You said there are two fields
in the table, "Group" and "Branch". Each *record* in the table therefore
contains these two fields, so saying "There is a single record in this field"
makes no sense.

What data is the table supposed to contain? If you want to track what
version number each Branch/Group has, then you a third field in the table -
VersionNumber.

You can update the table with SQL, for example:

mySQL="UPDATE MyTable set VersionNumber = " & NewVersionNumber &
" WHERE Branch = '" & BranchName & "' AND Group = '" & GroupName & "'"

db.execute SQL

Please clarify if I don't have my assumptions right.


HTH

John
 

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