hfcoverlover
New member
- Local time
- Today, 14:59
- Joined
- Jun 25, 2009
- Messages
- 3
The following is code to open a form and records with a specific date as input by the user:
Private Sub cmdDisplayCovers_Click()
On Error GoTo Err_cmdDisplayCovers_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmInventory"
stLinkCriteria = "[tblCovers].[Date] = [Forms]![frmCoversByDate]![txtDate]"
DoCmd.OpenForm stDocName, , , stLinkCriteria
etc. etc.
Am looking for help to generate a message to user if no records match the input and then return to the
input form. Any help appreciated. Currently, the form opens even with no records. I have searched the forum,
but many samples are way above.
Don
Private Sub cmdDisplayCovers_Click()
On Error GoTo Err_cmdDisplayCovers_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmInventory"
stLinkCriteria = "[tblCovers].[Date] = [Forms]![frmCoversByDate]![txtDate]"
DoCmd.OpenForm stDocName, , , stLinkCriteria
etc. etc.
Am looking for help to generate a message to user if no records match the input and then return to the
input form. Any help appreciated. Currently, the form opens even with no records. I have searched the forum,
but many samples are way above.
Don