G
Guest
I imagine this is a simple issue for someone who knows what they're doing.
I have a form with several checkboxes, etc. for setting up a query define a
recordset for a series of activites assigned to buttons at the bottom of the
form.
To allow more capable users of creating their own queries I created a
subform that will, more or less, allow the user to define their own query.
The form has a function: checkCriteria(DocName) that puts the string
together for the query.
On the subform I created: Public Function MapQCriteria(DocName) which does
the same thing.
When I try to call my MapQCriteria from the parent form (as below) it tells
me "Sub or Function not defined" (the function works fine when called from
the subform)
What am I missing here?
Thanks
David
Private Sub CmdRepPacket_Click()
Dim SqlWhere As String
Dim DocName As String
If FrmMappingQrySub.Visible = False Then
SqlWhere = checkCriteria(DocName)
Else
SqlWhere = MapQCriteria(DocName)
End If
DoCmd.OpenReport "HouseVisitPackets", acViewPreview, , SqlWhere
End Sub
I have a form with several checkboxes, etc. for setting up a query define a
recordset for a series of activites assigned to buttons at the bottom of the
form.
To allow more capable users of creating their own queries I created a
subform that will, more or less, allow the user to define their own query.
The form has a function: checkCriteria(DocName) that puts the string
together for the query.
On the subform I created: Public Function MapQCriteria(DocName) which does
the same thing.
When I try to call my MapQCriteria from the parent form (as below) it tells
me "Sub or Function not defined" (the function works fine when called from
the subform)
What am I missing here?
Thanks
David
Private Sub CmdRepPacket_Click()
Dim SqlWhere As String
Dim DocName As String
If FrmMappingQrySub.Visible = False Then
SqlWhere = checkCriteria(DocName)
Else
SqlWhere = MapQCriteria(DocName)
End If
DoCmd.OpenReport "HouseVisitPackets", acViewPreview, , SqlWhere
End Sub