EDozier
asked on
Select Case not allowing variable to be used
Hello,
I have some code that depending on the day of the week a certain query is created:
Select Case Today.dayofweek
Case 1
ProEnroll = From pe In Me.DataWorkspace.Applicati onData.Pai dProgramsE nrollments
Where pe.ProgramName = pp.ProgramName andAlso pe.Monday = True
Case 2
ProEnroll = From pe In Me.DataWorkspace.Applicati onData.Pai dProgramsE nrollement s
Where pe.ProgramName = pp.ProgramName andAlso pe.Tuesday = True
End Select
When I go to use ProEnroll, intellisense does not recognize it. If it was not in a Select Case structure Intellisense would recognize it. How can I get around this.
Thanks
I have some code that depending on the day of the week a certain query is created:
Select Case Today.dayofweek
Case 1
ProEnroll = From pe In Me.DataWorkspace.Applicati
Where pe.ProgramName = pp.ProgramName andAlso pe.Monday = True
Case 2
ProEnroll = From pe In Me.DataWorkspace.Applicati
Where pe.ProgramName = pp.ProgramName andAlso pe.Tuesday = True
End Select
When I go to use ProEnroll, intellisense does not recognize it. If it was not in a Select Case structure Intellisense would recognize it. How can I get around this.
Thanks
Where/how did you declare ProEnroll?
ASKER
kaufmed,
I did not declare it. Here is code just before the statement I previously included that works:
Dim ProgramQuery = From p In Me.DataWorkspace.Applicati onData.Pai dProgramsS et
Order By p.ProgramName
This variable is not declared but intellisense picks it up and I have access to that entity set.
However, I'm open to any viable option that will move me forward.
EDozier
I did not declare it. Here is code just before the statement I previously included that works:
Dim ProgramQuery = From p In Me.DataWorkspace.Applicati
Order By p.ProgramName
This variable is not declared but intellisense picks it up and I have access to that entity set.
However, I'm open to any viable option that will move me forward.
EDozier
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.