Hi All,
I am a beginner at Access and am having a strange problem with cascading comboboxes
I have 2 combo boxes (referencing the same table 'MasterTable')
I want the contents of 1 combobox (named 'FieldCombo') to vary depending on the selection I make to the other (named 'TableCombo')
I have done the following till now:
In the AfterUpdate() of TableCombo:
Private Sub TableCombo_AfterUpdate()
Dim fieldSource As String
fieldSource = "Select t_fields from MasterList where t_name =" & Forms!
MainForm!TableCombo.Value
Me.FieldCombo.RowSource = fieldSource
Me.FieldCombo.RowSourceType = "Table/Query"
Me.FieldCombo.BoundColumn = 1
End Sub
In the Enter() of FieldCombo
Private Sub FieldCombo_Enter()
Me.FieldCombo.Requery
End Sub
My problem is that once I make a selection in TableCombo and click on FieldCombo, I get a popup asking me the following:
Enter a Parameter value:
I then have to re-enter the value I just selected from TableCombo again
I dont want this to appear and want the contents of FieldCombo to be AutoPopulated.
Any help is greatly appreaciated
I am a beginner at Access and am having a strange problem with cascading comboboxes
I have 2 combo boxes (referencing the same table 'MasterTable')
I want the contents of 1 combobox (named 'FieldCombo') to vary depending on the selection I make to the other (named 'TableCombo')
I have done the following till now:
In the AfterUpdate() of TableCombo:
Private Sub TableCombo_AfterUpdate()
Dim fieldSource As String
fieldSource = "Select t_fields from MasterList where t_name =" & Forms!
MainForm!TableCombo.Value
Me.FieldCombo.RowSource = fieldSource
Me.FieldCombo.RowSourceType = "Table/Query"
Me.FieldCombo.BoundColumn = 1
End Sub
In the Enter() of FieldCombo
Private Sub FieldCombo_Enter()
Me.FieldCombo.Requery
End Sub
My problem is that once I make a selection in TableCombo and click on FieldCombo, I get a popup asking me the following:
Enter a Parameter value:
I then have to re-enter the value I just selected from TableCombo again
I dont want this to appear and want the contents of FieldCombo to be AutoPopulated.
Any help is greatly appreaciated
Last edited: