Hi,
this probably is a stupid question, but I cannot work it out myself.
I have this table tblAnalyticalCodes with 3 fields in it:
-Analytical code
-Description
-Groupcode (this is the code of a main group)
there are 3 tables involved here like this:
tblProducts n--1 tblAnalyticalCodes n--1 tblMainGroup
ProductId AnalyticalCode Groupcode
.... Description .....
AnalyticalCode Groupcode
Now, I have this form frmAddProducts, where you can fill in everything about a product, including the analytical code. The user is able to choose an analytical code from a listbox, based on the table tblAnalyticalCodes.
SELECT [tblAnalyticalCodes].[AnalyticalCode], [tblAnalyticalCodes].[Description], [tblAnalyticalCodes].[Groupcode] FROM tblAnalyticalCodes ORDER BY [tblAnalyticalCodes].[AnalyticalCode];
Now I would like there to be 2 listboxes, both based on the table tblAnalyticalCodes, but one showing the codes, and one showing the descriptions. I can manage this, but I haven't figured out how to make sure that, when I change a value from one listbox, the matching value in the other listbox gets shown.
Thanks a lot in advance,
dj.
this probably is a stupid question, but I cannot work it out myself.
I have this table tblAnalyticalCodes with 3 fields in it:
-Analytical code
-Description
-Groupcode (this is the code of a main group)
there are 3 tables involved here like this:
tblProducts n--1 tblAnalyticalCodes n--1 tblMainGroup
ProductId AnalyticalCode Groupcode
.... Description .....
AnalyticalCode Groupcode
Now, I have this form frmAddProducts, where you can fill in everything about a product, including the analytical code. The user is able to choose an analytical code from a listbox, based on the table tblAnalyticalCodes.
SELECT [tblAnalyticalCodes].[AnalyticalCode], [tblAnalyticalCodes].[Description], [tblAnalyticalCodes].[Groupcode] FROM tblAnalyticalCodes ORDER BY [tblAnalyticalCodes].[AnalyticalCode];
Now I would like there to be 2 listboxes, both based on the table tblAnalyticalCodes, but one showing the codes, and one showing the descriptions. I can manage this, but I haven't figured out how to make sure that, when I change a value from one listbox, the matching value in the other listbox gets shown.
Thanks a lot in advance,
dj.