| |

VB & DatenbankenLaufzeitfehler 94 - Verwendung von Null unzulässig | |  | Autor: gaby | Datum: 21.01.05 08:14 |
| Hallo und good Morning,
ich habe nun meine Kundenverwaltung fast fertig - nun habe ich noch ein Feld in die Datenbank geschrieben und zwar - Rabatt - habe es definiert (heißt cmbRabatt - ComboBox) nun erhalte ich die Fehlermeldung - wie oben erwähnt. Füge euch mal unten meine Codezeilen ein.
If RS.RecordCount > 0 Then
lblDKNummer.Caption = "D" & Format(RS.Fields("DKNummer").Value, "0000000")
txtAnsprechEmail.Text = RS.Fields("AnsprechEmail").Value
txtAnsprechMobil.Text = RS.Fields("AnsprechMobil").Value
txtAnsprechpartner.Text = RS.Fields("Ansprechpartner").Value
txtATU.Text = RS.Fields("ATU").Value
txtBank1.Text = RS.Fields("Bank1").Value
txtBank2.Text = RS.Fields("Bank2").Value
txtBlz1.Text = RS.Fields("BLZ1").Value
txtBlz2.Text = RS.Fields("BLZ2").Value
txtBranche.Text = RS.Fields("Branche").Value
lblDatumAenderung.Caption = RS.Fields("DatumAenderung").Value
lblDatumAnlage.Caption = RS.Fields("DatumAnlage").Value
txtEmail.Text = RS.Fields("Email").Value
txtFirma.Text = RS.Fields("Firma").Value
txtHomepage.Text = RS.Fields("Homepage").Value
txtKonto1.Text = RS.Fields("Konto1").Value
txtKonto2.Text = RS.Fields("Konto2").Value
cmbLand.Text = RS.Fields("Land").Value
txtMobil.Text = RS.Fields("Mobil").Value
txtOrt.Text = RS.Fields("Ort").Value
txtPlz.Text = RS.Fields("Plz").Value
txtStrasse.Text = RS.Fields("Strasse").Value
txtTelefax.Text = RS.Fields("Telefax").Value
txtTelefon.Text = RS.Fields("Telefon").Value
lblZeitAenderung.Caption = RS.Fields("ZeitAenderung").Value
lblZeitAnlage.Caption = RS.Fields("ZeitAnlage").Value
cmbRabatt.Text = RS.Fields("Rabatt").Value ' es geht um diesen Eintrag
End If
Für das Speichern habe ich ihn auch schon hineingeschrieben
'Der Datensatz wird in die DB geschrieben
Auswahl "Insert Into Kunden " & _
"(ATU, Firma, Branche, Strasse, Land, PLZ, Ort, Telefon," & _
"Telefax, Mobil, EMail, Homepage, Ansprechpartner, AnsprechMobil," & _
"AnsprechEMail, Bank1, BLZ1, Rabatt, Konto1, Bank2, BLZ2, Konto2, DatumAnlage," & _
"DatumAenderung, ZeitAnlage, ZeitAenderung) Values (" & _
"'" & txtATU.Text & "','" & cmbRabatt.Text & "','" & txtFirma.Text & "','" & _
txtBranche.Text & "','" & txtStrasse.Text & "','" & cmbLand.Text & "','" & _
txtPlz.Text & "','" & txtOrt.Text & "','" & txtTelefon.Text & "','" & _
txtTelefax.Text & "','" & txtMobil.Text & "','" & txtEmail.Text & "','" & _
txtHomepage.Text & "','" & txtAnsprechpartner.Text & "','" & _
txtAnsprechMobil & "','" & txtAnsprechEmail.Text & "','" & _
txtBank1.Text & "','" & txtBlz1.Text & "','" & txtKonto1.Text & "','" & _
txtBank2.Text & "','" & txtBlz2.Text & "','" & txtKonto2.Text & "','" & _
Format(Now, "dd-mm-yy") & "','" & Format(Now, "dd-mm-yy") & "','" & _
Format(Now, "hh:mm:ss") & "','" & Format(Now, "hh:mm:ss") & "')"
MsgBox "Das Speichern der Firma " & Trim(txtFirma.Text) & " wurde erfolgreich " & _
"durchgeführt", vbInformation, "Speichern erfolgreich"
Vielleicht kann mir jemand kurz helfen. Arbeite übrigens mit SQL.
Vielen Dank im Voraus.
Gaby
--------------------------------------------------
LG Gaby
Ooh yes, I'm the great Pretender !
Email: gmrb@twin.at
|  |
 | Sie sind nicht angemeldet! Um auf diesen Beitrag zu antworten oder neue Beiträge schreiben zu können, müssen Sie sich zunächst anmelden.
Einloggen | Neu registrieren |
  |
|
vb@rchiv CD Vol.6 vb@rchiv Vol.6
Geballtes Wissen aus mehr als 8 Jahren vb@rchiv!
Online-Update-Funktion Entwickler-Vollversionen u.v.m.Jetzt zugreifen Tipp des Monats Neu! sevEingabe 3.0 
Einfach stark!
Ein einziges Eingabe-Control für alle benötigten Eingabetypen und -formate, inkl. Kalender-, Taschenrechner und Floskelfunktion, mehrspaltige ComboBox mit DB-Anbindung, ImageComboBox u.v.m. Weitere Infos
|