Eliminate repitition in a drop down list
Hi there,
I have a main table that has various metals with specific metal codes.For example there is a material column such as titanium aluminium etc.And when metals are selected in my drop down list I want another drop down list to populate all the metals list. However, there is a repetition in my drop down list as for titanium there are various metal codes available such as Ti-64, Ti-10.2.3 etc.
To resolve this problem I have made another table and applied the following coding.
Private Sub cbo_matCat_AfterUpdate()
Dim matStr As String
matStr = "SELECT [TCategory].[Material] FROM [TCategory] WHERE ([Category] = '" & Me.cbo_matCat & "')ORDER BY [Material] ASC"
Me.cbo_mat.RowSource = matStr
Me.cbo_mat.Requery
End Sub
Is there any way I could do this using he main table and eliminating repetition through the coding.
Thanks
Hi there,
I have a main table that has various metals with specific metal codes.For example there is a material column such as titanium aluminium etc.And when metals are selected in my drop down list I want another drop down list to populate all the metals list. However, there is a repetition in my drop down list as for titanium there are various metal codes available such as Ti-64, Ti-10.2.3 etc.
To resolve this problem I have made another table and applied the following coding.
Private Sub cbo_matCat_AfterUpdate()
Dim matStr As String
matStr = "SELECT [TCategory].[Material] FROM [TCategory] WHERE ([Category] = '" & Me.cbo_matCat & "')ORDER BY [Material] ASC"
Me.cbo_mat.RowSource = matStr
Me.cbo_mat.Requery
End Sub
Is there any way I could do this using he main table and eliminating repetition through the coding.
Thanks
Last edited: