Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Validation of fields before adding a record
Message
De
15/10/1999 14:24:28
 
 
À
Tous
Information générale
Forum:
Visual Basic
Catégorie:
Autre
Titre:
Validation of fields before adding a record
Divers
Thread ID:
00277026
Message ID:
00277026
Vues:
69
I have a form with textboxes (fields). When the user presses the Add Record button, the program validates the info in each textbox .
I have a problem with the validation of the first field of the record:
when the info in the first field is OK, the program runs fine (the record is added)
when the info in the first field is wrong, I get the following error message:
Can not insert an empty row must have at lest one column value set.

and the .addnew line is higlighted

here are a few lines of the code:

With frmDelivrep.Adodc1.Recordset
.AddNew
If Not AllCtrlFiles.CheckTelco(frmAddDelivrep, txtTelco, lblTelco) Then GoTo TelcoExit
.Fields!telco = txtTelco.Text

TelcoExit:
Exit Sub

I think the problem is the program is expecting to add a record but because no fields are filled since the validation of the first field fails, I get an error. I have tried to update and to requry the recordset but I get the same error.

THank you,
Dominique Plante
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform