Hi, the “Refresh” part of the “Me.Refresh” in the code immediately following is described as “Method or data member not found” in a “Compiler Error” message:
Private Sub Command41_Click()
On Error GoTo Err_Command41_Click
Dim stDocName As String
stDocName = "Concomitant Medications"
Me.Refresh
DoCmd.OpenReport stDocName, acNormal, "", "[Patient Number]= " & Me![Patient Number]
Exit_Command41_Click:
Exit Sub
Err_Command41_Click:
MsgBox Err.Description
Resume Exit_Command41_Click
End Sub
Yet, what appears to me to be essentially the same bit of code compiles successfully
Private Sub Print_CRF_Click()
On Error GoTo Err_Print_CRF_Click
Dim stDocName As String
stDocName = "Follow-Up"
Me.Refresh
DoCmd.OpenReport stDocName, acNormal, "", "[Patient Number] = " & Me![Patient Number]
Exit_Print_CRF_Click:
Exit Sub
Err_Print_CRF_Click:
MsgBox Err.Description
Resume Exit_Print_CRF_Click
End Sub
Can someone out there explain what's going on here?
Private Sub Command41_Click()
On Error GoTo Err_Command41_Click
Dim stDocName As String
stDocName = "Concomitant Medications"
Me.Refresh
DoCmd.OpenReport stDocName, acNormal, "", "[Patient Number]= " & Me![Patient Number]
Exit_Command41_Click:
Exit Sub
Err_Command41_Click:
MsgBox Err.Description
Resume Exit_Command41_Click
End Sub
Yet, what appears to me to be essentially the same bit of code compiles successfully
Private Sub Print_CRF_Click()
On Error GoTo Err_Print_CRF_Click
Dim stDocName As String
stDocName = "Follow-Up"
Me.Refresh
DoCmd.OpenReport stDocName, acNormal, "", "[Patient Number] = " & Me![Patient Number]
Exit_Print_CRF_Click:
Exit Sub
Err_Print_CRF_Click:
MsgBox Err.Description
Resume Exit_Print_CRF_Click
End Sub
Can someone out there explain what's going on here?