Data Type mismatch error (1 Viewer)

Kirby

New member
Local time
Tomorrow, 04:50
Joined
Oct 26, 2011
Messages
5
I am having problems with the following code. The error is a 3464 data type mismatch error. I have had a look at the table that the procedure writes the data to and it all looks OK. Code below:

Private Sub AuftragAbgleichen()
Dim qdf As DAO.QueryDef
Dim sqlStr As String, sAuftragAlphanum As String
Dim ortId As Long

ortId = Nz(cmb_Orte.Value)

Set qdf = CurrentDb.CreateQueryDef("", _
"UPDATE AUFTRAEGE SET BAUORT_NR = p0, BAUSTRASSE = p1, BAUBEZEICHNUNG = p2, " & _
"AUFTRAG = p3, EstPanels = p4, Estm2 = p5, EstPrice = p6, Variations = p7, " & _
"startdate = p8, ordernumber = p9, finishdate = p10, invoiced = p11, epicor = p12, " & _
"estengineering = p13, esttotal = p14, " & _
"full = p15, braceplan = p17, wms = p18, transport = p19, bedplan = p20, sequence = p21, inspections = p22 " & _
"WHERE AUFTRAGS_NR = p16;")
With qdf
.Parameters("p0") = ortId
.Parameters("p1") = txt_LieferStrasse
.Parameters("p2") = txt_BauherrName
.Parameters("p3") = sAuftragAlphanum
.Parameters("p4") = TxtEstPanels
.Parameters("p5") = TxtEstM2
.Parameters("p6") = TxtEstPrice
.Parameters("p7") = txtVariations
.Parameters("p8") = txtStartDate
.Parameters("p9") = txtOrderNumber
.Parameters("p10") = txtFinishDate
.Parameters("p11") = txtInvoiced
.Parameters("p12") = txtEpicor
.Parameters("p13") = txtEngService
.Parameters("p14") = txtTotal
.Parameters("p15") = boxFull.Value
.Parameters("p16") = cmb_Auftragsnummer2.Value
.Parameters("p17") = boxBracePlan.Value
.Parameters("p18") = boxWMS.Value
.Parameters("p19") = boxTransportPlan.Value
.Parameters("p20") = boxBedPlan.Value
.Parameters("p21") = boxSequence.Value
.Parameters("p22") = boxInspections.Value
.Execute dbFailOnError
.Close
End With
End Sub



Can anyone tell me where the data type mismatch is?

Kirby
 
Last edited:

Users who are viewing this thread

Top Bottom