This is a code behind On Click event of a command button to open the amendment records for the current record in the current form.
Private Sub Open_Amendment_Records_Click()
On Error GoTo Err_Open_Amendment_Records_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = “DisplayAmendments”
stLinkCriteria = “[tnum]=” & Me![tnum]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Open_Amendment_Records_Click:
Exit Sub
Err_Open_Amendment_Records_Click:
MsgBox Err.Description
Resume Exit_Open_Amendment_Records_Click
End Sub
Now, What I was hoping to do was to remind the user that the form is empty if the current forms tnum field is empty. Im sure the following code is wrong but I was hoping someone would help me code something similar to this.
stLinkCriteria = “[tnum]=” & Me![tnum]
if Me![tnum] = Null
then MsgBox