I think the code below contains an idea of what I am trying to do. I am trying to generate a message box prompting the user to enter a value in the loan number field and to keep displaying the message till the user enters a value in the field and then move on to the rest of the code.
Hopefully this helps a little in disecting my issue. Thanks for your help.
Code:
Private Sub Save_Record_Click()
Dim SQL As String
Do
If IsNull(Me![Loan Number]) Then MsgBox "Please Enter Loan Number. This is a required field."
End If
Loop Until (Me![Loan Number]) = .Value
SQL = "Update Investor_Request set Status = 'Closed' where Loan_Number = " & Me![Loan Number] & _
" AND status = 'Outstanding'"
CurrentDb.Execute SQL, dbFailOnError
On Error GoTo Err_Save_Record_Click
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
Exit_Save_Record_Click:
Exit Sub
Err_Save_Record_Click:
MsgBox Err.Description
Resume Exit_Save_Record_Click
End Sub