C
Christine Vollberg via AccessMonster.com
Ok this is probably a very dumb question but it is making me a little nuts.
I have a subform that if you double click in a field it opens up a
information form based on the data in the field. But I want to cancel the
open form if the field is blank. Can't seam to get anything to work. It
opens the form either way. Here is the double-click event.
Private Sub JudgeBarRollNo_DblClick(Cancel As Integer)
Dim stDocName As String
Dim stLinkCriteria As String
If Me![JudgeBarRollNo] = Null Then
MsgBox "No Record has been selected"
Cancel = True
Exit Sub
Else
stDocName = "frmEnterAttorney/JudgeInformation"
stLinkCriteria = "[BarRollNo]=" & "'" & Me![JudgeBarRollNo] & "'"
DoCmd.OpenForm stDocName, acNormal, , stLinkCriteria
End If
End Sub
Anyhelp would be greatly appreciated.
I have a subform that if you double click in a field it opens up a
information form based on the data in the field. But I want to cancel the
open form if the field is blank. Can't seam to get anything to work. It
opens the form either way. Here is the double-click event.
Private Sub JudgeBarRollNo_DblClick(Cancel As Integer)
Dim stDocName As String
Dim stLinkCriteria As String
If Me![JudgeBarRollNo] = Null Then
MsgBox "No Record has been selected"
Cancel = True
Exit Sub
Else
stDocName = "frmEnterAttorney/JudgeInformation"
stLinkCriteria = "[BarRollNo]=" & "'" & Me![JudgeBarRollNo] & "'"
DoCmd.OpenForm stDocName, acNormal, , stLinkCriteria
End If
End Sub
Anyhelp would be greatly appreciated.