Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating Access Table Fields &Field Properties with VB6

Status
Not open for further replies.

zqtqzq

Programmer
Jul 23, 2003
61
0
0
A2
I need help! and very urgent help. Any one to help me with a vb code to create Field properties like

1. A field with AutoIncrement property
2. A field as a primary key field
3. A field as a foreign key
4. Field with default value

I am using Vb6 with Access 2000/2002
i want to create a Multi-Company software that can create the Company database on the fly and all the asociated tables and fields

God bless u all as you respond to my need

tunde aransiola
 
My recommendation would be to have a blankn database. When you need to add a new 'company', simply make a copy of the blank database to companyname.mdb

It will probably be faster and less error prone.

-George

Strong and bitter words indicate a weak cause. - Fortune cookie wisdom
 
Thank you for your suggestion. I appreciate. I have not thought of something like that. I will try the method of Copying a default database to the newly-created-company.

Actually i was thinking of something like a progress bar to indicate the Creation(of tables,fields,indexes) process
 
If you really want to do it the way you originally thought then you will want to look at using either ADO 2.x Ext reference or into SQL statements like CREATE TABLE and CREATE INDEX, etc.
 
With the copy method, you probably won't need a progress bar because a default (blank) database will probably be very small and will copy very quickly.

The only way this statement would not be true is if you have a lot of default data in lookup tables and such. You can test this, of course, by using explorer to copy the database from one folder to another. That would represent the approximate time required to create a new 'company' database.

-George

Strong and bitter words indicate a weak cause. - Fortune cookie wisdom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top