linking and cascading forms

S

steve a

is it possible to have an option box selection record data, open another form
and cascade its info into a combo box, so the row source of the combo box is
determined by the selection of the option box?

I have currently tried:

Private Sub Frame165_AfterUpdate()

Me.[Dept] = Choose([Frame165], "Dalby", "Fenton", "Kirby", "Farndale",
"Kyme", "Boston")
Me.Refresh

DoCmd.OpenForm "name", , , "ID = Forms![Activity form]!ID"

'Dim strname As String
' Select Case Frame165.Value
' Case 1
' strname = "OT"
' Case 2
' strname = "Social Work"
' Case 3
' strname = "Psychology"
' Case 4
' strname = "Nursing"
' Case 5
' strname = "Medical"
' Case 6
' strname = "Health & Leisure"
' End Select
' Forms![Name]!combo.RowSource = "Select [staff ID allocation].name " & _
' "FROM [staff ID allocation] " & _
"WHERE [staff ID allocation].department = '" & strname & "' " & _'
"ORDER BY [staff ID allocation].name;"
End Sub
 
S

steve a

obviously i have removed the prefix of ' from the above codes.

What currently happens is the combo box only appears with one selection from
the drop down.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top