Z
zufie
When I click the Command Button to open a form I receive the error:
Object Reuired.
This form is a subform connected to a main form.
Any suggestions?
Thanks!
Zuf
Here is the code behind the Command Button:
Private Sub Command108_Click()
On Error GoTo Err_Command108_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmQuery5"
' stLinkCriteria = "[CallDate] Between [Forms]![Main]![Child89].
[Form]![txtBeginQAEvry5th] And [Forms]![Main]![Child89].[Form]!
[txtEndQAStopEvry5th]"
stLinkCriteria = "[CallDate] Between #" & txtBeginQAEvry5th.Value
& "# and #" & txtEndQAStopEvry5th.Value & "#"
DoCmd.OPENFORM stDocName, acNormal, , stLinkCriteria, acFormEdit
Exit_Command108_Click:
Exit Sub
Err_Command108_Click:
MsgBox Err.Description
Resume Exit_Command108_Click
End Sub
Object Reuired.
This form is a subform connected to a main form.
Any suggestions?
Thanks!
Zuf
Here is the code behind the Command Button:
Private Sub Command108_Click()
On Error GoTo Err_Command108_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmQuery5"
' stLinkCriteria = "[CallDate] Between [Forms]![Main]![Child89].
[Form]![txtBeginQAEvry5th] And [Forms]![Main]![Child89].[Form]!
[txtEndQAStopEvry5th]"
stLinkCriteria = "[CallDate] Between #" & txtBeginQAEvry5th.Value
& "# and #" & txtEndQAStopEvry5th.Value & "#"
DoCmd.OPENFORM stDocName, acNormal, , stLinkCriteria, acFormEdit
Exit_Command108_Click:
Exit Sub
Err_Command108_Click:
MsgBox Err.Description
Resume Exit_Command108_Click
End Sub