select case

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Code not working any ideas? Form will not load selected table when choosing
team name.
E and d clients are tables.
Dim teamX as string
teamX = Me.cboTeam.text

Private Sub cboTeam_change()
Select Case teamX
Case "E"
Me.Form.Recordsource = "eClients"
Case "D"
Me.Form.Recordsource = "dClients"
End Select

Thanks
 
Put the following code in the AfterUpdate event of cboTeam:

Select Case Me![cboTeam].Column(1)
Case "E"
Me.Form.Recordsource = "eClients"
Case "D"
Me.Form.Recordsource = "dClients"
End Select

I am assuming the rowsource of cbo Team looks like:
TeamID
TeamName

and there are two teams to chhose from, "E" and "D".
 
Thank you...that worked!!!

:)

PC Datasheet said:
Put the following code in the AfterUpdate event of cboTeam:

Select Case Me![cboTeam].Column(1)
Case "E"
Me.Form.Recordsource = "eClients"
Case "D"
Me.Form.Recordsource = "dClients"
End Select

I am assuming the rowsource of cbo Team looks like:
TeamID
TeamName

and there are two teams to chhose from, "E" and "D".


--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
(e-mail address removed)
www.pcdatasheet.com

GM said:
Code not working any ideas? Form will not load selected table when
choosing
team name.
E and d clients are tables.
Dim teamX as string
teamX = Me.cboTeam.text

Private Sub cboTeam_change()
Select Case teamX
Case "E"
Me.Form.Recordsource = "eClients"
Case "D"
Me.Form.Recordsource = "dClients"
End Select

Thanks
 
Back
Top