G
Guest
From my main menu, I have a search button to allow a user to find a specific
record. Following is coding, which works fine in bringing up the correct
record, but also brings the main menu form to the front, in front of the form
I am calling. Can someone explain what is going on and how to fix it?
Private Sub cmdFind_Click()
If IsNull([DLCDGrant#]) Then
MsgBox ("You must enter a value in the field.")
ElseIf IsNull(DLookup("[DLCDGrant#]", "tblGrantSum", "[DLCDGrant#] = '" &
[Forms]![frmGrantRecSearch].[DLCDGrant#] & "'")) Then
MsgBox ("Record not Found.")
Else
DoCmd.OpenForm "frmGrantSumDE", , , "[DLCDGrant#] =
[forms]![frmGrantRecSearch].[DLCDGrant#]"
DoCmd.Close acForm, "frmGrantRecSearch"
End If
End Sub
Thanks, Lloyd
record. Following is coding, which works fine in bringing up the correct
record, but also brings the main menu form to the front, in front of the form
I am calling. Can someone explain what is going on and how to fix it?
Private Sub cmdFind_Click()
If IsNull([DLCDGrant#]) Then
MsgBox ("You must enter a value in the field.")
ElseIf IsNull(DLookup("[DLCDGrant#]", "tblGrantSum", "[DLCDGrant#] = '" &
[Forms]![frmGrantRecSearch].[DLCDGrant#] & "'")) Then
MsgBox ("Record not Found.")
Else
DoCmd.OpenForm "frmGrantSumDE", , , "[DLCDGrant#] =
[forms]![frmGrantRecSearch].[DLCDGrant#]"
DoCmd.Close acForm, "frmGrantRecSearch"
End If
End Sub
Thanks, Lloyd