Hej Ser lite skumt ut med en Where sats. Testa detta:Type Mismatch, Arrghhh
Jag håller på å få släpp. Får Type Mismatch hela tiden, hittar inte felet.
I databasen är alla fält text utom, ProjektNummer, KostUtr, TimKost som är Long och TotalSum och SummaTim som är Double
Dim ProjektNummer As Long
Dim Personal As String
Dim Maskin As String
Dim Arbete As String
Dim Matrial As String
Dim KostUtr As Long
Dim Offert As String
Dim JobbJaNej As String
Dim Other As String
Dim Kund As String
Dim Namn As String
Dim SummaTim As Double
Dim TimKost As Long
Dim TotalSum As Double
Dim txtProjNr As Long
RS.Open "INSERT INTO TBL_ProjektLogg WHERE ProjektNummer=" & txtProjNr & "", "(ProjektNummer, Personal, Arbete, Matrial, Maskin, KostUtr, Offert, JobbJaNej, Other, Kund ,Namn, SummaTim, TimKost, TotalSum) " & " VALUES (" & "" & ProjektNummer & ", " & "'" & Personal & "', " & "'" & Arbete & "'," & "'" & Matrial & "'," & "'" & Maskin & "'," & "" & KostUtr & "," & "'" & Offert & "'," & "'" & JobbJaNej & "'," & "'" & Other & "'," & "'" & Kund & "'," & "'" & Namn & "'," & "" & SummaTim & "," & "" & TimKost & "," & "" & TotalSum & "" & ")", Dcon
Sv: Type Mismatch, Arrghhh
RS.Open "INSERT INTO TBL_ProjektLogg (ProjektNummer, Personal, Arbete, Matrial, Maskin, KostUtr, Offert, JobbJaNej, Other, Kund ,Namn, SummaTim, TimKost, TotalSum) " & vbCrLf & _
"VALUES (" & ProjektNummer & ", '" & Personal & "', '" & Arbete & "', '" & Matrial & "', '" & Maskin & "', " & KostUtr & ", '" & Offert & "', '" & JobbJaNej & "', '" & Other & "', '" & Kund & "', '" & Namn & "', " & SummaTim & ", " & TimKost & ", " & TotalSum & ")", Dcon