M
magmike
I'm trying to recycle a form, rather than copy it and just change the
data source. What I have done on an OnClick Event is the following
(which isn't working!):
Private Sub SeeSelected_Click(Cancel As Integer)
Dim stForm As String
Dim stQuery As String
stForm = "ProspectSearch"
stQuery = "WHERE ProspectTable.Select = -1"
DoCmd.OpenForm stForm, , , stQuery
End Sub
ProspectSearch by default shows every record until a search term is
typed into a search box. I am trying to open it to where only records
whose field [Select] is checked. I've also tried the following (which
tells me I can't assign a value to this object):
Private Sub SeeSelected_Click(Cancel As Integer)
Dim stForm As String
stForm = "ProspectSearch"
DoCmd.OpenForm stForm
Forms!ProspectSearch!findquery.Form.Filter = "Select = -1"
End Sub
I also tried the above with '-1'
Thanks in advance for your help!
magmike
data source. What I have done on an OnClick Event is the following
(which isn't working!):
Private Sub SeeSelected_Click(Cancel As Integer)
Dim stForm As String
Dim stQuery As String
stForm = "ProspectSearch"
stQuery = "WHERE ProspectTable.Select = -1"
DoCmd.OpenForm stForm, , , stQuery
End Sub
ProspectSearch by default shows every record until a search term is
typed into a search box. I am trying to open it to where only records
whose field [Select] is checked. I've also tried the following (which
tells me I can't assign a value to this object):
Private Sub SeeSelected_Click(Cancel As Integer)
Dim stForm As String
stForm = "ProspectSearch"
DoCmd.OpenForm stForm
Forms!ProspectSearch!findquery.Form.Filter = "Select = -1"
End Sub
I also tried the above with '-1'
Thanks in advance for your help!
magmike