Simple cascading combobox's

  • Thread starter Thread starter Graham
  • Start date Start date
G

Graham

Still struggling with this!
I can make three selections in my first combobox, Resource, which I then
want to populate my second combobox, Capability, with data held in three
separate tables.
I think the first combo is working OK, but the second fails to update. I
think it may have something to do with the RowSource property for that second
combobox ?
Should this be automatically populated from the code below, in the
AfterUpdate property of my first box ?
Also the debug doesn't like the [Capability] on the 5th. line, I get the
error message "External Name not defined", I've tried all sorts of
permutations but to no avail. It is happy with "[Resource]" on the third line
? Any suggestions ?

Private Sub Resource_AfterUpdate()
On Error Resume Next
Select Case "[Resource]"
Case "System Engineering Services"
[Capability].RowSource = "[SESPrimaryCapability]"
Case "Management Services"
[Capability].RowSource = "[MSPrimaryCapability]"
Case "Specialist Services"
[Capability].RowSource = "[SSPrimaryCapability]"
End Select
Me!Capability.RowSource.Requery
End Sub
 
Back
Top