A
A.J.M. van Rijthoven
I have a form with data from a box (Table box), on his form is a
subform with the instuments that are in this box. The instruments
(Table instruments) are categorized by category (Table Category). This
is done because there are a verry much different instruments to choose
from. Now I want to choose a category so that the active record in the
subtable (combobox) shows only the instruments that belong to the
selected category. This works fine, but all my other records in the
subtable (instrument_in_net) are responding to the new category as
well (all the current values disappear when I move the mouse over it,
while the actual data remains unchanged). Is there a way to avoid
this?? So that ONLY the record that has the focus, reacts to the
change of the category?
Some more relevant information:
Table Instrumenten:
INSID
CATID (linked to tbale category)
Instrumentnaam
Subtable instrument_in_net
BOXID (linked to table box)
INSID (linked to tblinstuments)
Amount
Table Category
CATID
Categoryname
On the form (inhoud_van_net), the category (voorlopigcategorie) is a
non-stored value. I use it only to build a query. When I cange the
category, the program changes the query according to the selection:
(Public is a public declared value)
Private Sub voorlopigcategorie_Change()
If voorlopigcategorie.Text = "-" Then
'show all instruments
PublicSql = "SELECT Instrumenten.Categorie,
Instrumenten.Instrumentnaam FROM Instrumenten;"
Else
'show only instruments from choosen category
PublicSql = "SELECT instrumenten.Instrumentnaam,
instrumenten.Categorie FROM instrumenten WHERE
(((instrumenten.Categorie)=[Forms]![Inhoud_van_net]![voorlopigcategorie].[value]));"
End If
End Sub
subform with the instuments that are in this box. The instruments
(Table instruments) are categorized by category (Table Category). This
is done because there are a verry much different instruments to choose
from. Now I want to choose a category so that the active record in the
subtable (combobox) shows only the instruments that belong to the
selected category. This works fine, but all my other records in the
subtable (instrument_in_net) are responding to the new category as
well (all the current values disappear when I move the mouse over it,
while the actual data remains unchanged). Is there a way to avoid
this?? So that ONLY the record that has the focus, reacts to the
change of the category?
Some more relevant information:
Table Instrumenten:
INSID
CATID (linked to tbale category)
Instrumentnaam
Subtable instrument_in_net
BOXID (linked to table box)
INSID (linked to tblinstuments)
Amount
Table Category
CATID
Categoryname
On the form (inhoud_van_net), the category (voorlopigcategorie) is a
non-stored value. I use it only to build a query. When I cange the
category, the program changes the query according to the selection:
(Public is a public declared value)
Private Sub voorlopigcategorie_Change()
If voorlopigcategorie.Text = "-" Then
'show all instruments
PublicSql = "SELECT Instrumenten.Categorie,
Instrumenten.Instrumentnaam FROM Instrumenten;"
Else
'show only instruments from choosen category
PublicSql = "SELECT instrumenten.Instrumentnaam,
instrumenten.Categorie FROM instrumenten WHERE
(((instrumenten.Categorie)=[Forms]![Inhoud_van_net]![voorlopigcategorie].[value]));"
End If
End Sub