Form not ready for next entry

gsbatch1

Registered User.
Local time
Today, 12:00
Joined
Dec 28, 2010
Messages
45
I have a form that is for inputting new data into a table. It works great, except when you go to enter in any new records after the initial record. I have a button for updating, and after the button is hit, it clears the form for the newxt entry. If I put in new info, and fill out every text box, I go to hit "Add Record" and it does not add the record nor does it clear the form for the next entry.It just sits there locked up.
 
Is your form bound (linked to a table) or are you using DAO/ADO?
 
Yes it is bound. Like I said, it will allow for entry of the first record, but if I try to enter any further record, it just sits there.
Below is my code for the Button_Click() event, which is wheere I think the issue is.


'------------------------------------------------------------
' cmdSaveRcrd_Click
'
'------------------------------------------------------------
Private Sub cmdSaveRcrd_Click()
If IsNull(cboBilling) Or cboBilling = "" Then
MsgBox "Billing System required."
cboBilling.SetFocus
Cancel = True
ElseIf IsNull(txtAcct) Or txtAcct = "" Then
MsgBox "Account # is required."
txtAcct.SetFocus
Cancel = True
ElseIf IsNull(cboMrkt) Or cboMrkt = "" Then
MsgBox "Market is required."
cboMrkt.SetFocus
Cancel = True
ElseIf IsNull(cboRegion) Or cboRegion = "" Then
MsgBox "Region is required."
cboRegion.SetFocus
Cancel = True
ElseIf IsNull(cboRslvd) Or cboRslvd = "" Then
MsgBox "Resolved is required."
cboRslvd.SetFocus
Cancel = True
ElseIf IsNull(cboCard) Or cboRslvd = "" Then
MsgBox "Card Manufacturer is required."
cboRslvd.SetFocus
Cancel = True
ElseIf cboCard = "Moto" And DataID.Visible = True And IsNull(DataID) Or DataID = "" Then
MsgBox "Data ID is required."
DataID.SetFocus
Cancel = True
ElseIf IsNull(txtCCSN) Or txtCCSN = "" Then
MsgBox "Card SN# is required."
txtCCSN.SetFocus
Cancel = True
ElseIf IsNull(txtCCID) Or txtCCID = "" Then
MsgBox "Card ID is required."
txtCCID.SetFocus
Cancel = True
ElseIf IsNull(txtHostID) Or txtHostID = "" Then
MsgBox "Host ID is required."
txtHostID.SetFocus
Cancel = True
ElseIf IsNull(cboCusRepProb) Or cboCusRepProb = "" Then
MsgBox "Customer Reported Problem is required."
cboCusRepProb.SetFocus
Cancel = True

End If
On Error Resume Next
DoCmd.GoToRecord , "", acNewRec

If (MacroError <> 0) Then
Beep
MsgBox MacroError.Description, vbOKOnly, ""
End If

End Sub
 

Users who are viewing this thread

Back
Top Bottom