N
Nick
I looked at the url that John W. Vinson[MVP] told me to
look at and I cant get it working!!!
The site says:
"The RowSourceType of cbxCombo1 is set to "Field List" and
RowSource to a table Category. cbxCombo2 doesn't have
anything under RowSource."
^^^ Does this mean that cbxCombo2 has RowSourceType set
to "Field List" aswell or is it set to "Table/Query"???
The next bit of code goes into the After Update of the
first combo box:
"Private Sub cbxCombo1_AfterUpdate()
Dim strSQL As String
strSQL = "Select " & Me!cbxCombo1
strSQL = strSQL & " from Categories"
Me!cbxCombo2.RowSourceType = "Table/Query"
Me!cbxCombo2.RowSource = strSQL
End Sub"
^^^ So all I change here is the cbxCombo1 & 2 to the names
of my combo boxes, or do I need to change something else???
Lastly, where do I put and what do I need to change with
this:
"To filter records in a combo/listbox based on the value
selected in another combo/listbox, you can use a stored
query which uses the first control's value as a parameter.
For example,
Select PeopleID, PeopleName from tblPeople Where PeopleID
= Forms!FormName!NameOfFirstControl;"
^^^^
"Then all thats left to do is put this bit of code in the
After Update of the second combo box right???:
Private Sub NameOfFirstControl_AfterUpdate()
Me!NameOfSecondControl.Requery
End Sub"
^^^
Also, what needs changing here???
Sorry, I know I sound dumb, but if I put obvious questions
down then I wont have to ask again if I dont get it working
Thanks for your time
Nick
look at and I cant get it working!!!
The site says:
"The RowSourceType of cbxCombo1 is set to "Field List" and
RowSource to a table Category. cbxCombo2 doesn't have
anything under RowSource."
^^^ Does this mean that cbxCombo2 has RowSourceType set
to "Field List" aswell or is it set to "Table/Query"???
The next bit of code goes into the After Update of the
first combo box:
"Private Sub cbxCombo1_AfterUpdate()
Dim strSQL As String
strSQL = "Select " & Me!cbxCombo1
strSQL = strSQL & " from Categories"
Me!cbxCombo2.RowSourceType = "Table/Query"
Me!cbxCombo2.RowSource = strSQL
End Sub"
^^^ So all I change here is the cbxCombo1 & 2 to the names
of my combo boxes, or do I need to change something else???
Lastly, where do I put and what do I need to change with
this:
"To filter records in a combo/listbox based on the value
selected in another combo/listbox, you can use a stored
query which uses the first control's value as a parameter.
For example,
Select PeopleID, PeopleName from tblPeople Where PeopleID
= Forms!FormName!NameOfFirstControl;"
^^^^
"Then all thats left to do is put this bit of code in the
After Update of the second combo box right???:
Private Sub NameOfFirstControl_AfterUpdate()
Me!NameOfSecondControl.Requery
End Sub"
^^^
Also, what needs changing here???
Sorry, I know I sound dumb, but if I put obvious questions
down then I wont have to ask again if I dont get it working
Thanks for your time
Nick