J
JamesJ
Access 2007
I'm using the following code to filter records in frmHomeInv.
Dim strAll As String
Dim strSQL As String
If Me!cboProductTypeFilter.Column(1) = "<<All>>" Then
strAll = "SELECT * FROM tblHomeInv ORDER BY ProductTypeID, Product"
Me.RecordSource = strAll
Me.lstHomeInv.RowSource = strAll
Me.lstHomeInv.Selected(0) = True
Else
strSQL = "SELECT * FROM tblHomeInv WHERE (((ProductTypeID)=" &
[cboProductTypeFilter].[Value] & "))ORDER BY ProductTypeID, Product"
Me.RecordSource = strSQL
Me.lstHomeInv.RowSource = strSQL
Me.lstHomeInv.Selected(0) = True
End If
After returning the proper records, the BackStyle or the BackColor of the
ProductTypeID field that is in tblProductType and has a relationship with a
field by the
same name in tblHomeInv, changes to the existing BackColor of the Detail
section of the Form.
This does not occur at this time with any other form but has previously and
I'm not sure why it stopped doing it.
Even placing code at the end of If..Else to force the proper color doesn't
work.
Did Compact and repair......
Any help will; be appreciated.
I'm using the following code to filter records in frmHomeInv.
Dim strAll As String
Dim strSQL As String
If Me!cboProductTypeFilter.Column(1) = "<<All>>" Then
strAll = "SELECT * FROM tblHomeInv ORDER BY ProductTypeID, Product"
Me.RecordSource = strAll
Me.lstHomeInv.RowSource = strAll
Me.lstHomeInv.Selected(0) = True
Else
strSQL = "SELECT * FROM tblHomeInv WHERE (((ProductTypeID)=" &
[cboProductTypeFilter].[Value] & "))ORDER BY ProductTypeID, Product"
Me.RecordSource = strSQL
Me.lstHomeInv.RowSource = strSQL
Me.lstHomeInv.Selected(0) = True
End If
After returning the proper records, the BackStyle or the BackColor of the
ProductTypeID field that is in tblProductType and has a relationship with a
field by the
same name in tblHomeInv, changes to the existing BackColor of the Detail
section of the Form.
This does not occur at this time with any other form but has previously and
I'm not sure why it stopped doing it.
Even placing code at the end of If..Else to force the proper color doesn't
work.
Did Compact and repair......
Any help will; be appreciated.