Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Validation of fields before adding a record
Message
From
15/10/1999 14:24:28
 
 
To
All
General information
Forum:
Visual Basic
Category:
Other
Title:
Validation of fields before adding a record
Miscellaneous
Thread ID:
00277026
Message ID:
00277026
Views:
70
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
Next
Reply
Map
View

Click here to load this message in the networking platform