M
Marie via AccessMonster.com
Am using Allen Browne's "Filter a Form on a Field in a Subform" article to
enable me to filter a Main Form (frmEntity) using the AfterUpdate event of
the cboShowStore combo box. The combo box is based on the dbo_Stores table.
Please see code below.
Dim strSQL As String
If IsNull(Me.cboShowStore) Then
Me.RecordSource = "dbo_Entities"
Else
strSQL = "SELECT DISTINCTROW dbo_Entities.* FROM dbo_Entities INNER JOIN
EntitiesStores ON dbo_Entities.Entity = EntitiesStores.Entity WHERE
EntitiesStores.Store = ' Me.cboShowStore '"
Me.RecordSource = strSQL
End If
End Sub
When I select a store from the drop down list, all information on the Entity
form is removed.
I tried creating a query with the same logic and it returned the appropriate
record.
I must be missing something
Thanks in advance for your help,
Marie
enable me to filter a Main Form (frmEntity) using the AfterUpdate event of
the cboShowStore combo box. The combo box is based on the dbo_Stores table.
Please see code below.
Dim strSQL As String
If IsNull(Me.cboShowStore) Then
Me.RecordSource = "dbo_Entities"
Else
strSQL = "SELECT DISTINCTROW dbo_Entities.* FROM dbo_Entities INNER JOIN
EntitiesStores ON dbo_Entities.Entity = EntitiesStores.Entity WHERE
EntitiesStores.Store = ' Me.cboShowStore '"
Me.RecordSource = strSQL
End If
End Sub
When I select a store from the drop down list, all information on the Entity
form is removed.
I tried creating a query with the same logic and it returned the appropriate
record.
I must be missing something
Thanks in advance for your help,
Marie