Good morning,



I'm new on this forum and it is a pleasure for me to be her to submit my question to you.
I need an help on this problems in an access (2003) form.
I'm trying to realize a input form able to record the data concerning customer order.

In this form, I have two combo boxes connected each other.
Each of these combo are taking data by two tables : [tbl_DescrPrd] and [tbl_PrdPack].

The tables have the same structure :
[tbl_DescrPrd] :
Col.1 [ID_prd] ; Col.2 [Prod Name] ; Col.3 [Packaging] ; Col.4 [Packaging description] ; Col.5 [Article code] ; Col.6 [Id_pack]

[tbl_PrdPack] :
Col.1 [ID_prd] ; Col.2 [Product]

The columns [ID-prd] are linked by relationship


The second combo (pack) is showing perfectly the results coming by the selection of the first combo (product). So no problem here.

The selection of the two combos has to input a new data in a specific table, but unfortunatly that's is not happening and the combos are inputing data referred to different coloumns. If I try to correct the "bound column", I can have success with the second combo (pack) but with the first combo (product) I receive an error.

Both the bound columns (in the combos properties) are assigned to number "1".


Here the VBA code :

Private Sub cbo_product_BeforeUpdate(Cancel As Integer)
Dim sManagerSource As String

sManagerSource = "SELECT [tbl_DescrPrd].[ID_pack], [tbl_DescrPrd].[ID_prd], [tbl_DescrPrd].[packaging] " & _
"FROM tbl_DescrPrd " & _
"WHERE [ID_prd] = " & Me.Cbo_product.Value
Me.Cbo_pack.RowSource = sManagerSource
Me.Cbo_pack.Requery
End Sub


I don't know if these data can help to have a clear picture of the problem. I can also send the specific file.

THanks a lot for all the help you can give me