Yes, the code does work. Below is the full procedure.
I am using an unbound form, simply because the example I am working with uses and unbound from with the above code. I have thought of other ways, but so far, this seems to make sense to me. Open to any suggestions.
Thanks
Code:
Private Sub Command12_Click()If IsNull([txt_Serial_Number]) Then
MsgBox "Serial Number Cannot be Blank"
ElseIf IsNull([txt_RID]) Then
MsgBox "Radio ID Cannot be Blank"
ElseIf IsNull([txt_Company]) Then
MsgBox "Company Cannot be Blank"
ElseIf IsNull([txt_Display]) Then
MsgBox "Display Cannot be Blank"
ElseIf IsNull([txt_date_issued]) Then
MsgBox "Date Issued Cannot be Blank"
Else
DoCmd.RunSQL "insert into tbl_radio_inventory (Serial_Number,RID,Company,Display,Date_Issued)values([txt_Serial_Number],[txt_RID],[txt_Company],[txt_Display],[txt_date_issued])"
[me.txt_Serial_Number] = Null
[me.txt_RID] = Null
[me.txt_Company] = Null
[me.txt_Display] = Null
[me.txt_date_issued] = Null
End If
End Sub