select case

G

GM

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
 
P

PC Datasheet

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".
 
G

GM

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
[email protected]
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
 
Top