update a field

  • Thread starter Thread starter Guest
  • Start date Start date
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....
 
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
 
Back
Top