data entries question

A

Alex

Hi experts,

I'm using a continuous form for data entries into
textboxes applying recordset.
When user entered data and in some textbox it's incorrect
all entered data (because of Exit Sub and no reaching
Update ) is disappearing. The user should enter everything
again. How could I avoid it and correct only incorrect
data.

Thanks

While .EOF

If ![UsedUnits] > 0 Or ![UsedKG] > 0 Then

.Edit

...

snlRecUnits = ![RecUnits] - ![UsedUnits]
If snlRecUnits >= 0 Then
![RecUnits] = snlRecUnits
Else
DoCmd.GoToRecord acDataForm, strFormName, acGoTo, n
Msg = MsgBox("The rest of units cannot be less than 0 in
the row #" & n & ".", vbCritical, _
"Units less than 0")

rst.Close
dbs.Close
Exit Sub
End If
...
..Update
End If
...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top