david.paton
Registered User.
- Local time
- Yesterday, 16:13
- Joined
- Jun 26, 2013
- Messages
- 338
Hi,
I have a form that has a query embedded on the form in a sub form. I then have a combo box on the form that I want to filter the query results depending on the town I select from the combo box.
In the query, I have the TownID from the town table, with the criteria =[forms]![frmLegateeList]![cboTown] with cboTown being the combo box that has allows the selection of a town. I also have the information I need to have shown relating to the record I wish to select the town for.
When I try and run the query, i get no results.
I also got help with this code as I can't code, that is behind my combo box:
Private Sub cboTown_AfterUpdate()
If IsNull(cboBox) Then
Me.FilterOn = False
Else
Me.Filter = "[town]='" & Me.cboBox & "'"
Me.FilterOn = True
End If
End Sub
How can I get it working?
Thanks,
Dave
I have a form that has a query embedded on the form in a sub form. I then have a combo box on the form that I want to filter the query results depending on the town I select from the combo box.
In the query, I have the TownID from the town table, with the criteria =[forms]![frmLegateeList]![cboTown] with cboTown being the combo box that has allows the selection of a town. I also have the information I need to have shown relating to the record I wish to select the town for.
When I try and run the query, i get no results.
I also got help with this code as I can't code, that is behind my combo box:
Private Sub cboTown_AfterUpdate()
If IsNull(cboBox) Then
Me.FilterOn = False
Else
Me.Filter = "[town]='" & Me.cboBox & "'"
Me.FilterOn = True
End If
End Sub
How can I get it working?
Thanks,
Dave