Re: Access 2003 mismatch type 13 error already loaded DAO library
- From: "TimkenSteve" <seyers@xxxxxxxxxx>
- Date: 19 Sep 2006 05:17:18 -0700
I found my error. the 9th column I refernced was supposed to be the 8th
column
TimkenSteve wrote:
HI all,
I am using a loop to populate the last field of a table and am getting
the mismatch erorr. When I made the code origionally It worked, now I
copyed all necessary tables and module to another database and it
errors?
Sub usbNormal()
Dim db As DAO.Database
Dim rstOld As DAO.Recordset
Dim rstNew As DAO.Recordset
Dim iFields As Integer
Set db = CurrentDb()
Set rstOld = db.OpenRecordset("CATS_Dump")
Set rstNew = db.OpenRecordset("CATS_DumpNormal", dbOpenDynaset)
With rstOld
.MoveFirst
Do Until .EOF
For iFields = 9 To rstOld.Fields.Count - 1
If .Fields(iFields) > 0 Then
rstNew.AddNew
rstNew.Fields("CATS") = ![CATS]
rstNew.Fields("Bill To Acct Code") = ![Bill To
Acct Code]
rstNew.Fields("Attachment Names") =
![Attachment Names]
rstNew.Fields("Agreement Status") = ![Agreement
Status]
rstNew.Fields("Agreement Type") = ![Agreement
Type]
rstNew.Fields("End Date") = ![End Date]
rstNew.Fields("Agreement Detail") = ![Agreement
Detail]
rstNew.Fields("Rebate Percentage") = ![Rebate
Percentage]
rstNew.Fields("PC") =
CInt(.Fields(iFields).Name)
rstNew.Update
End If
Next iFields
.MoveNext
Loop
End With
End Sub
any ideas?
Steve
.
- References:
- Access 2003 mismatch type 13 error already loaded DAO library
- From: TimkenSteve
- Access 2003 mismatch type 13 error already loaded DAO library
- Prev by Date: Re: Editing Sub Forms
- Next by Date: Re: how do I set up a data base report with drop down menu's?
- Previous by thread: Re: Access 2003 mismatch type 13 error already loaded DAO library
- Next by thread: Re: Execute code from other MS Office Products
- Index(es):
Relevant Pages
|