dao

dao

Post by Reuel Cru » Fri, 29 May 1998 04:00:00



Hi,

I have some questions I hope anyone could give light on:

     I created a database using DAO, how do I create a relation between
the Company, Tech, and Details tables?

     How can I assign the fields that I created using DAO, I have done
so with Data Control. But it has limitations when used
     for three recordsets in one form. Or when I use two or three
dbCombo boxes to get the fields from other tables to be
     used on one.

I have included the codes I used in creating the database.

'A separate module for creating the database
Public Sub MakeDBase()
    Dim dbase As Database, ws As Workspace
    Dim IdxFlds(5) As Field
    Dim CompanyTd As TableDef, DetailsTd As TableDef, TechTd As
TableDef, JobTd As TableDef
    Dim CompanyIdx(4) As Index, DetailsIdx(2) As Index, TechIdx As
Index, JobIdx As Index
    Dim CompanyFlds(55) As Field, DetailsFlds(4) As Field, TechFlds(13)
As Field, JobFlds(4) As Field
    Dim X As Integer, dbfile As String

    On Error GoTo dberrorhandler
        'Assign filename in Common Dialog to dbfile
    dbfile = frmMain.dlgCompany.filename

    Set ws = DBEngine.Workspaces(0)
    Set dbase = ws.CreateDatabase(dbfile, dbLangGeneral, dbVersion35)

    'Create new TableDef for DETAILS table
    Set DetailsTd = dbase.CreateTableDef("Details")
        'Create Fields and set Properties
    Set DetailsFlds(0) = DetailsTd.CreateField("CompanyName", dbText,
50)
    Set DetailsFlds(1) = DetailsTd.CreateField("Tech_Name", dbText, 50)
    Set DetailsFlds(2) = DetailsTd.CreateField("Date", dbText, 8)
    Set DetailsFlds(3) = DetailsTd.CreateField("Note", dbMemo)
        'Set Attributes
    For X = 0 To 3
        DetailsFlds(X).AllowZeroLength = False
    Next X
        'Append Fields to Fields collection
    For X = 0 To 3
        DetailsTd.Fields.Append DetailsFlds(X)
    Next X
        'Create Index and Properties
    For X = 0 To 2
        Set DetailsIdx(X) = DetailsTd.CreateIndex()
    Next X
    DetailsIdx(0).Name = "CompanyName"
    DetailsIdx(0).Primary = False
    DetailsIdx(0).Unique = False
    Set IdxFlds(0) = DetailsIdx(0).CreateField("CompanyName")

    DetailsIdx(1).Name = "Tech_Name"
    DetailsIdx(1).Primary = False
    DetailsIdx(1).Unique = False
    Set IdxFlds(1) = DetailsIdx(1).CreateField("Tech_Name")

    DetailsIdx(2).Name = "Date"
    DetailsIdx(2).Primary = False
    DetailsIdx(2).Unique = False
    Set IdxFlds(2) = DetailsIdx(2).CreateField("Date")
        'Append Fields to Index object
    For X = 0 To 2
        DetailsIdx(X).Fields.Append IdxFlds(X)
    Next X
        'Append Indexes to TableDef
    For X = 0 To 2
        DetailsTd.Indexes.Append DetailsIdx(X)
    Next X
        'Append TableDef to TableDef collection
    dbase.TableDefs.Append DetailsTd

    'Create new TableDef for Company Table
    Set CompanyTd = dbase.CreateTableDef("Company")
        'Cust Info
    Set CompanyFlds(0) = CompanyTd.CreateField("ShipperNumber", dbText,
6)
    Set CompanyFlds(1) = CompanyTd.CreateField("CompanyName", dbText,
50)
    Set CompanyFlds(2) = CompanyTd.CreateField("ContactName", dbText,
50)
    Set CompanyFlds(3) = CompanyTd.CreateField("Address", dbText, 56)
    Set CompanyFlds(4) = CompanyTd.CreateField("City", dbText, 35)
    Set CompanyFlds(5) = CompanyTd.CreateField("Prov", dbText, 25)
    Set CompanyFlds(6) = CompanyTd.CreateField("PostalCode", dbText, 6)
    Set CompanyFlds(7) = CompanyTd.CreateField("RRDD", dbText, 10)
    Set CompanyFlds(8) = CompanyTd.CreateField("MainPhone", dbText, 13)
    Set CompanyFlds(9) = CompanyTd.CreateField("Extension", dbText, 6)
    Set CompanyFlds(10) = CompanyTd.CreateField("DataPhone", dbText, 13)

        'Other Details
    Set CompanyFlds(11) = CompanyTd.CreateField("AE_Name", dbText, 50)
    Set CompanyFlds(12) = CompanyTd.CreateField("Tech_Name", dbText, 50)

    Set CompanyFlds(13) = CompanyTd.CreateField("Date", dbText, 8)
    Set CompanyFlds(14) = CompanyTd.CreateField("Version", dbText, 6)
    Set CompanyFlds(15) = CompanyTd.CreateField("Notes", dbMemo)
        'Equipment
    Set CompanyFlds(16) = CompanyTd.CreateField("CPU", dbText, 30)
    Set CompanyFlds(17) = CompanyTd.CreateField("Monitor", dbText, 30)
    Set CompanyFlds(18) = CompanyTd.CreateField("Scanner", dbText, 30)
    Set CompanyFlds(19) = CompanyTd.CreateField("Printer1", dbText, 30)
    Set CompanyFlds(20) = CompanyTd.CreateField("Printer2", dbText, 30)
    Set CompanyFlds(21) = CompanyTd.CreateField("Printer3", dbText, 30)
    Set CompanyFlds(22) = CompanyTd.CreateField("Printer4", dbText, 30)
    Set CompanyFlds(23) = CompanyTd.CreateField("Scale", dbText, 30)
    Set CompanyFlds(24) = CompanyTd.CreateField("Modem", dbText, 30)
    Set CompanyFlds(25) = CompanyTd.CreateField("NIC", dbText, 30)
    Set CompanyFlds(26) = CompanyTd.CreateField("Other", dbText, 30)
        'Model
    Set CompanyFlds(27) = CompanyTd.CreateField("ModelCPU", dbText, 30)
    Set CompanyFlds(28) = CompanyTd.CreateField("ModelMon", dbText, 30)
    Set CompanyFlds(29) = CompanyTd.CreateField("ModelScan", dbText, 30)

    Set CompanyFlds(30) = CompanyTd.CreateField("ModelPrnt1", dbText,
30)
    Set CompanyFlds(31) = CompanyTd.CreateField("ModelPrnt2", dbText,
30)
    Set CompanyFlds(32) = CompanyTd.CreateField("ModelPrnt3", dbText,
30)
    Set CompanyFlds(33) = CompanyTd.CreateField("ModelPrnt4", dbText,
30)
    Set CompanyFlds(34) = CompanyTd.CreateField("ModelScale", dbText,
30)
    Set CompanyFlds(35) = CompanyTd.CreateField("ModelModem", dbText,
30)
    Set CompanyFlds(36) = CompanyTd.CreateField("ModelNIC", dbText, 30)
    Set CompanyFlds(37) = CompanyTd.CreateField("ModelOther", dbText,
30)
        'Serial No
    Set CompanyFlds(38) = CompanyTd.CreateField("SerialNoCPU", dbText,
30)
    Set CompanyFlds(39) = CompanyTd.CreateField("SerialNoMon", dbText,
30)
    Set CompanyFlds(40) = CompanyTd.CreateField("SerialNoScan", dbText,
30)
    Set CompanyFlds(41) = CompanyTd.CreateField("SerialNoPrnt1", dbText,
30)
    Set CompanyFlds(42) = CompanyTd.CreateField("SerialNoPrnt2", dbText,
30)
    Set CompanyFlds(43) = CompanyTd.CreateField("SerialNoPrnt3", dbText,
30)
    Set CompanyFlds(44) = CompanyTd.CreateField("SerialNoPrnt4", dbText,
30)
    Set CompanyFlds(45) = CompanyTd.CreateField("SerialNoScale", dbText,
30)
    Set CompanyFlds(46) = CompanyTd.CreateField("SerialNoModem", dbText,
30)
    Set CompanyFlds(47) = CompanyTd.CreateField("SerialNoNIC", dbText,
30)
    Set CompanyFlds(48) = CompanyTd.CreateField("SerialNoOther", dbText,
30)
        'Accept
    Set CompanyFlds(49) = CompanyTd.CreateField("CustSig", dbText, 30)
    Set CompanyFlds(50) = CompanyTd.CreateField("CustTitle", dbText, 30)

    Set CompanyFlds(51) = CompanyTd.CreateField("CustDate", dbText, 8)
    Set CompanyFlds(52) = CompanyTd.CreateField("UPSSig", dbText, 30)
    Set CompanyFlds(53) = CompanyTd.CreateField("UPSTitle", dbText, 30)
    Set CompanyFlds(54) = CompanyTd.CreateField("UPSDate", dbText, 8)
    Set CompanyFlds(55) = CompanyTd.CreateField("Password", dbText, 10)

    For X = 1 To 55
        CompanyFlds(X).AllowZeroLength = True
    Next X

    For X = 0 To 55
        CompanyTd.Fields.Append CompanyFlds(X)
    Next X

    For X = 0 To 4
        Set CompanyIdx(X) = CompanyTd.CreateIndex()
    Next X

    CompanyIdx(0).Name = "ShipperNumber"
    CompanyIdx(0).Primary = True
    CompanyIdx(0).Unique = True
    Set IdxFlds(0) = CompanyIdx(0).CreateField("ShipperNumber")

    CompanyIdx(1).Name = "CompanyName"
    CompanyIdx(1).Primary = False
    CompanyIdx(1).Unique = False
    Set IdxFlds(1) = CompanyIdx(1).CreateField("CompanyName")

    CompanyIdx(2).Name = "Tech_Name"
    CompanyIdx(2).Primary = False
    CompanyIdx(2).Unique = False
    Set IdxFlds(2) = CompanyIdx(2).CreateField("Tech_Name")

    CompanyIdx(3).Name = "AE_Name"
    CompanyIdx(3).Primary = False
    CompanyIdx(3).Unique = False
    Set IdxFlds(3) = CompanyIdx(3).CreateField("AE_Name")

    CompanyIdx(4).Name = "Date"
    CompanyIdx(4).Primary = False
    CompanyIdx(4).Unique = False
    Set IdxFlds(4) = CompanyIdx(4).CreateField("Date")

    For X = 0 To 4
        CompanyIdx(X).Fields.Append IdxFlds(X)
    Next X

    For X = 0 To 4
        CompanyTd.Indexes.Append CompanyIdx(X)
    Next X

    dbase.TableDefs.Append CompanyTd

    Set TechTd = dbase.CreateTableDef("Tech")
    'Tech
    Set TechFlds(0) = TechTd.CreateField("Tech_Name", dbText, 50)
    Set TechFlds(1) = TechTd.CreateField("Title", dbText, 50)
    Set TechFlds(2) = TechTd.CreateField("Address", dbText, 56)
    Set TechFlds(3) = TechTd.CreateField("City", dbText, 35)
    Set TechFlds(4) = TechTd.CreateField("Prov", dbText, 2)
    Set TechFlds(5) = TechTd.CreateField("PostalCode", dbText, 6)
    Set TechFlds(6) = TechTd.CreateField("Phone", dbText, 10)
    Set TechFlds(7) = TechTd.CreateField("Fax", dbText, 13)
    Set TechFlds(8) = TechTd.CreateField("Extension", dbText, 6)
    Set TechFlds(9) = TechTd.CreateField("Cell", dbText, 13)
    Set TechFlds(10) = TechTd.CreateField("Pager", dbText, 50)
    Set TechFlds(11) = TechTd.CreateField("Sysm", dbText, 50)
    Set TechFlds(12) = TechTd.CreateField("Email", dbText, 25)
    Set TechFlds(13) = TechTd.CreateField("Note", dbMemo)

    For X = 1 To 13
        TechFlds(X).AllowZeroLength = True
    Next X

    For X = 0 To 13
        TechTd.Fields.Append TechFlds(X)
    Next X

    Set TechIdx = TechTd.CreateIndex()

    TechIdx.Name = "Tech_Name"
    TechIdx.Primary = True
    TechIdx.Unique = True
    Set IdxFlds(0) = TechIdx.CreateField("Tech_Name")

    TechIdx.Fields.Append IdxFlds(0)

    TechTd.Indexes.Append TechIdx

    dbase.TableDefs.Append TechTd

    MsgBox ("Database created")

    dbase.Close
    Exit Sub
    'Error handler to call the same function if execution is
unsuccessful
dberrorhandler:
    MakeDBase
End Sub

Thanks,

 
 
 

dao

Post by Reuel Cru » Sat, 30 May 1998 04:00:00


> Hi,

> I have some questions I hope anyone could give light on:

>      I created a database using DAO, how do I create a relation between
> the Company, Tech, and Details tables?

>      How can I assign the fields that I created using DAO, I have done
> so with Data Control. But it has limitations when used
>      for three recordsets in one form. Or when I use two or three
> dbCombo boxes to get the fields from other tables to be
>      used on one.

> I have included the codes I used in creating the database.

> 'A separate module for creating the database
> Public Sub MakeDBase()
>     Dim dbase As Database, ws As Workspace
>     Dim IdxFlds(5) As Field
>     Dim CompanyTd As TableDef, DetailsTd As TableDef, TechTd As
> TableDef, JobTd As TableDef
>     Dim CompanyIdx(4) As Index, DetailsIdx(2) As Index, TechIdx As
> Index, JobIdx As Index
>     Dim CompanyFlds(55) As Field, DetailsFlds(4) As Field, TechFlds(13)
> As Field, JobFlds(4) As Field
>     Dim X As Integer, dbfile As String

>     On Error GoTo dberrorhandler
>         'Assign filename in Common Dialog to dbfile
>     dbfile = frmMain.dlgCompany.filename

>     Set ws = DBEngine.Workspaces(0)
>     Set dbase = ws.CreateDatabase(dbfile, dbLangGeneral, dbVersion35)

>     'Create new TableDef for DETAILS table
>     Set DetailsTd = dbase.CreateTableDef("Details")
>         'Create Fields and set Properties
>     Set DetailsFlds(0) = DetailsTd.CreateField("CompanyName", dbText,
> 50)
>     Set DetailsFlds(1) = DetailsTd.CreateField("Tech_Name", dbText, 50)
>     Set DetailsFlds(2) = DetailsTd.CreateField("Date", dbText, 8)
>     Set DetailsFlds(3) = DetailsTd.CreateField("Note", dbMemo)
>         'Set Attributes
>     For X = 0 To 3
>         DetailsFlds(X).AllowZeroLength = False
>     Next X
>         'Append Fields to Fields collection
>     For X = 0 To 3
>         DetailsTd.Fields.Append DetailsFlds(X)
>     Next X
>         'Create Index and Properties
>     For X = 0 To 2
>         Set DetailsIdx(X) = DetailsTd.CreateIndex()
>     Next X
>     DetailsIdx(0).Name = "CompanyName"
>     DetailsIdx(0).Primary = False
>     DetailsIdx(0).Unique = False
>     Set IdxFlds(0) = DetailsIdx(0).CreateField("CompanyName")

>     DetailsIdx(1).Name = "Tech_Name"
>     DetailsIdx(1).Primary = False
>     DetailsIdx(1).Unique = False
>     Set IdxFlds(1) = DetailsIdx(1).CreateField("Tech_Name")

>     DetailsIdx(2).Name = "Date"
>     DetailsIdx(2).Primary = False
>     DetailsIdx(2).Unique = False
>     Set IdxFlds(2) = DetailsIdx(2).CreateField("Date")
>         'Append Fields to Index object
>     For X = 0 To 2
>         DetailsIdx(X).Fields.Append IdxFlds(X)
>     Next X
>         'Append Indexes to TableDef
>     For X = 0 To 2
>         DetailsTd.Indexes.Append DetailsIdx(X)
>     Next X
>         'Append TableDef to TableDef collection
>     dbase.TableDefs.Append DetailsTd

>     'Create new TableDef for Company Table
>     Set CompanyTd = dbase.CreateTableDef("Company")
>         'Cust Info
>     Set CompanyFlds(0) = CompanyTd.CreateField("ShipperNumber", dbText,
> 6)
>     Set CompanyFlds(1) = CompanyTd.CreateField("CompanyName", dbText,
> 50)
>     Set CompanyFlds(2) = CompanyTd.CreateField("ContactName", dbText,
> 50)
>     Set CompanyFlds(3) = CompanyTd.CreateField("Address", dbText, 56)
>     Set CompanyFlds(4) = CompanyTd.CreateField("City", dbText, 35)
>     Set CompanyFlds(5) = CompanyTd.CreateField("Prov", dbText, 25)
>     Set CompanyFlds(6) = CompanyTd.CreateField("PostalCode", dbText, 6)
>     Set CompanyFlds(7) = CompanyTd.CreateField("RRDD", dbText, 10)
>     Set CompanyFlds(8) = CompanyTd.CreateField("MainPhone", dbText, 13)
>     Set CompanyFlds(9) = CompanyTd.CreateField("Extension", dbText, 6)
>     Set CompanyFlds(10) = CompanyTd.CreateField("DataPhone", dbText, 13)

>         'Other Details
>     Set CompanyFlds(11) = CompanyTd.CreateField("AE_Name", dbText, 50)
>     Set CompanyFlds(12) = CompanyTd.CreateField("Tech_Name", dbText, 50)

>     Set CompanyFlds(13) = CompanyTd.CreateField("Date", dbText, 8)
>     Set CompanyFlds(14) = CompanyTd.CreateField("Version", dbText, 6)
>     Set CompanyFlds(15) = CompanyTd.CreateField("Notes", dbMemo)
>         'Equipment
>     Set CompanyFlds(16) = CompanyTd.CreateField("CPU", dbText, 30)
>     Set CompanyFlds(17) = CompanyTd.CreateField("Monitor", dbText, 30)
>     Set CompanyFlds(18) = CompanyTd.CreateField("Scanner", dbText, 30)
>     Set CompanyFlds(19) = CompanyTd.CreateField("Printer1", dbText, 30)
>     Set CompanyFlds(20) = CompanyTd.CreateField("Printer2", dbText, 30)
>     Set CompanyFlds(21) = CompanyTd.CreateField("Printer3", dbText, 30)
>     Set CompanyFlds(22) = CompanyTd.CreateField("Printer4", dbText, 30)
>     Set CompanyFlds(23) = CompanyTd.CreateField("Scale", dbText, 30)
>     Set CompanyFlds(24) = CompanyTd.CreateField("Modem", dbText, 30)
>     Set CompanyFlds(25) = CompanyTd.CreateField("NIC", dbText, 30)
>     Set CompanyFlds(26) = CompanyTd.CreateField("Other", dbText, 30)
>         'Model
>     Set CompanyFlds(27) = CompanyTd.CreateField("ModelCPU", dbText, 30)
>     Set CompanyFlds(28) = CompanyTd.CreateField("ModelMon", dbText, 30)
>     Set CompanyFlds(29) = CompanyTd.CreateField("ModelScan", dbText, 30)

>     Set CompanyFlds(30) = CompanyTd.CreateField("ModelPrnt1", dbText,
> 30)
>     Set CompanyFlds(31) = CompanyTd.CreateField("ModelPrnt2", dbText,
> 30)
>     Set CompanyFlds(32) = CompanyTd.CreateField("ModelPrnt3", dbText,
> 30)
>     Set CompanyFlds(33) = CompanyTd.CreateField("ModelPrnt4", dbText,
> 30)
>     Set CompanyFlds(34) = CompanyTd.CreateField("ModelScale", dbText,
> 30)
>     Set CompanyFlds(35) = CompanyTd.CreateField("ModelModem", dbText,
> 30)
>     Set CompanyFlds(36) = CompanyTd.CreateField("ModelNIC", dbText, 30)
>     Set CompanyFlds(37) = CompanyTd.CreateField("ModelOther", dbText,
> 30)
>         'Serial No
>     Set CompanyFlds(38) = CompanyTd.CreateField("SerialNoCPU", dbText,
> 30)
>     Set CompanyFlds(39) = CompanyTd.CreateField("SerialNoMon", dbText,
> 30)
>     Set CompanyFlds(40) = CompanyTd.CreateField("SerialNoScan", dbText,
> 30)
>     Set CompanyFlds(41) = CompanyTd.CreateField("SerialNoPrnt1", dbText,
> 30)
>     Set CompanyFlds(42) = CompanyTd.CreateField("SerialNoPrnt2", dbText,
> 30)
>     Set CompanyFlds(43) = CompanyTd.CreateField("SerialNoPrnt3", dbText,
> 30)
>     Set CompanyFlds(44) = CompanyTd.CreateField("SerialNoPrnt4", dbText,
> 30)
>     Set CompanyFlds(45) = CompanyTd.CreateField("SerialNoScale", dbText,
> 30)
>     Set CompanyFlds(46) = CompanyTd.CreateField("SerialNoModem", dbText,
> 30)
>     Set CompanyFlds(47) = CompanyTd.CreateField("SerialNoNIC", dbText,
> 30)
>     Set CompanyFlds(48) = CompanyTd.CreateField("SerialNoOther", dbText,
> 30)
>         'Accept
>     Set CompanyFlds(49) = CompanyTd.CreateField("CustSig", dbText, 30)
>     Set CompanyFlds(50) = CompanyTd.CreateField("CustTitle", dbText, 30)

>     Set CompanyFlds(51) = CompanyTd.CreateField("CustDate", dbText, 8)
>     Set CompanyFlds(52) = CompanyTd.CreateField("UPSSig", dbText, 30)
>     Set CompanyFlds(53) = CompanyTd.CreateField("UPSTitle", dbText, 30)
>     Set CompanyFlds(54) = CompanyTd.CreateField("UPSDate", dbText, 8)
>     Set CompanyFlds(55) = CompanyTd.CreateField("Password", dbText, 10)

>     For X = 1 To 55
>         CompanyFlds(X).AllowZeroLength = True
>     Next X

>     For X = 0 To 55
>         CompanyTd.Fields.Append CompanyFlds(X)
>     Next X

>     For X = 0 To 4
>         Set CompanyIdx(X) = CompanyTd.CreateIndex()
>     Next X

>     CompanyIdx(0).Name = "ShipperNumber"
>     CompanyIdx(0).Primary = True
>     CompanyIdx(0).Unique = True
>     Set IdxFlds(0) = CompanyIdx(0).CreateField("ShipperNumber")

>     CompanyIdx(1).Name = "CompanyName"
>     CompanyIdx(1).Primary = False
>     CompanyIdx(1).Unique = False
>     Set IdxFlds(1) = CompanyIdx(1).CreateField("CompanyName")

>     CompanyIdx(2).Name = "Tech_Name"
>     CompanyIdx(2).Primary = False
>     CompanyIdx(2).Unique = False
>     Set IdxFlds(2) = CompanyIdx(2).CreateField("Tech_Name")

>     CompanyIdx(3).Name = "AE_Name"
>     CompanyIdx(3).Primary = False
>     CompanyIdx(3).Unique = False
>     Set IdxFlds(3) = CompanyIdx(3).CreateField("AE_Name")

>     CompanyIdx(4).Name = "Date"
>     CompanyIdx(4).Primary = False
>     CompanyIdx(4).Unique = False
>     Set IdxFlds(4) = CompanyIdx(4).CreateField("Date")

>     For X = 0 To 4
>         CompanyIdx(X).Fields.Append IdxFlds(X)
>     Next X

>     For X = 0 To 4
>         CompanyTd.Indexes.Append CompanyIdx(X)
>     Next X

>     dbase.TableDefs.Append CompanyTd

>     Set TechTd = dbase.CreateTableDef("Tech")
>     'Tech
>     Set TechFlds(0) = TechTd.CreateField("Tech_Name", dbText, 50)
>     Set TechFlds(1) = TechTd.CreateField("Title", dbText, 50)
>     Set TechFlds(2) = TechTd.CreateField("Address", dbText, 56)
>     Set TechFlds(3) = TechTd.CreateField("City", dbText, 35)
>     Set TechFlds(4) = TechTd.CreateField("Prov", dbText, 2)
>     Set TechFlds(5) = TechTd.CreateField("PostalCode", dbText, 6)
>     Set TechFlds(6) = TechTd.CreateField("Phone", dbText, 10)
>     Set TechFlds(7) = TechTd.CreateField("Fax", dbText, 13)
>     Set TechFlds(8) = TechTd.CreateField("Extension", dbText, 6)
>     Set TechFlds(9) = TechTd.CreateField("Cell", dbText, 13)
>     Set TechFlds(10) = TechTd.CreateField("Pager", dbText, 50)
>     Set TechFlds(11) = TechTd.CreateField("Sysm", dbText, 50)
>     Set TechFlds(12) = TechTd.CreateField("Email", dbText, 25)
>     Set TechFlds(13) = TechTd.CreateField("Note", dbMemo)

>     For X = 1 To 13
>         TechFlds(X).AllowZeroLength = True
>     Next X

>     For X = 0 To 13
>         TechTd.Fields.Append TechFlds(X)
>     Next X

>     Set TechIdx = TechTd.CreateIndex()

>     TechIdx.Name = "Tech_Name"
>     TechIdx.Primary = True
>     TechIdx.Unique = True
>     Set IdxFlds(0) = TechIdx.CreateField("Tech_Name")

...

read more »

 
 
 

1. UGRGENT: VB4 DAO - Error 31037 Error Loading from File DAO Error 3251

This is the trapable error numbers that occur when one form attempts to
load another form.  The functions work fine on the development machines but
not on an end user's machine.  When the call is made to make the second
form visible or show, the obove messages can be trapped.  However, the form
that is to be loaded, the Form_Load event is never fired off.  Where is
this error occurring.  The form being loaded does have data controls, APEX
True DBGrid 4, DBCombo boxes.  I'm exhausted trying to find the offending
section of code!!

Any suggestions

--
John A. Binhammer

2. Access 2.0 Parameter Query

3. HELP PLS--DAO 3.51 OK, DAO 3.6 NOT WORKING

4. using triggers for referential integrity

5. Calling DAO directly from MFC DAO classes

6. SQL Server 7.0 Beta 3 BUG - changing 'sum' to 'avg' in column vie w causes SQL Serevr to exit

7. Security problem DAO 3.51 --> DAO 3.6

8. SaberC++ and OODBs

9. Assigning a Dao.Recordset to a Datacontrol With VB6 SP4 and Dao.360

10. Error 3146 with DAO 3.6 (ok with DAO 3.5)

11. DAO 3.6 vs DAO 3.5 openrecordset

12. Upgrade from DAO 3.5 to DAO 3.6

13. dao 3.6 can't refresh dao datacontrol