hi guys. is it possible to make a new tables using vb6 and duplicate some field names on the database access 2003.

the program were to work just like this.

the program can create a unlimited numbers of table that only changes the month date and some field names for payments on electric bills. hope for a reply.

It is possible. I haven't done any serious database work now for over ten years, but that was almost the exact technique I used to manage a set of tables for a large system (400mB monthly tables kept from 1998 forward). At the end of each month I had to create a new monthly database with tables for the new month. By also creating views consisting of the new month and the current month the applications never had to contend with new monthly names.

I would normally never recommend splitting tables in this way, but if you must the easiest way to create and maintain access objects from VB is using DAO. Look specifically for the following methods

.Fields.Append .CreateField

to get at the existing column list use

.TableDefs("your current table").Fields

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.18 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.