dcount of filtered form

  • Thread starter Thread starter John
  • Start date Start date
J

John

I have a form that opens a second form that is filtered against the field
MR# code from the form wizard as follows:
Private Sub cmdOpenMr_Click()
On Error GoTo Err_cmdOpenMr_Click
'DoCmd.GoToRecord , , acNewRec
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "frmAdmissionDetails"

stLinkCriteria = "[MR#]=" & "'" & Me![MR#] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria


Exit_cmdOpenMr_Click:
Exit Sub

Err_cmdOpenMr_Click:
MsgBox Err.Description
Resume Exit_cmdOpenMr_Click

I would simply like to have an unbound text box on the second form showing
the number of records that have been filtered, but having a difficult time
getting the syntax correct.

Thanks for you help
 
Back
Top