Updating table field definitions cod

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a front end / back end database program. I want to update a field
(OdomStart) within the Statistics table in the BikeLog_be.mdb to double and
one decimal places. I would like help on the source code do the update from
the Frontend database. I have a menu option on the frontend that is intended
to run updates but have not yet done this. Any help on the process and/or
code would be greatly apprecieated.

Thank you.
 
Hi
to change a field type you have to perform 4 steps:
create a new field with desired type
copy data from old field to new one using update query
delete old field
rename new field to old
so you can write such routine in VBA, and then call it to update your table
 
Basically you have to open the backend database with dao

1) rename the old field through tabledefs
2) add a new field according your specifications
3) run an update query which is fills the new field with the old data
4) Delete the old field.
 
Back
Top