Well, I am still searching for an answer, but I thought I'd post while I continue looking.
I am creating an "update tool" for an existing database.
What I am trying to do is add a field to an existing table in a database from a user specified location.
Example:
txt_Path is the full path to the database I want to update. I get a type mismatch here.
Any help or a link would be appreciated.
Craig
I am creating an "update tool" for an existing database.
What I am trying to do is add a field to an existing table in a database from a user specified location.
Example:
- User browses for the existing file.
- I create a backup of the original.
- I'm updating some forms and reports. (I have this part no problem)
- I get hung up trying to add a field to a table.
Code:
Dim DBS As DAO.Database
Dim TBL As DAO.TableDef
Dim FLD As DAO.Field
Set DBS = txt_Path
Set TBL = DBS.TableDefs("subtbl_JobTracking")
Set FLD = TBL.CreateField("txt_Description")
FLD.Type = dbText
FLD.Size = 255
TBL.Fields.Append FLD
Any help or a link would be appreciated.
Craig