A
anil
Hi all
I am using the query as(example)
Select * from Q1 where frequency=F1(WeekNo)
and using this function as
Function F1(WeekNo As Integer) As String
If WeekNo = 1 Then
F1 = "weekly" Or "Monthly"
ElseIf WeekNo = 2 Then
F1 = "weekly" Or "Quaterly"
ElseIf WeekNo = 3 Then
F1 = "weekly" Or "Annually"
Else
FrequencyNo = "weekly"
End If
End Function
Actually what I need is
Select * from Q1 where frequency = "weekly" or "Monthly"
if the weekNo is 1 which is calculated in Q1
I tried using
Select * from Q1 where Frequency = iif(IIf([Q1].[WeekNo])=1,"Monthly"or
"weekly",IIf([Q1].[WeekNo])=2,"Quaterly" or
"weekly",IIf([Q1].[WeekNo])=3,"Annually"or "weekly","Weekly")))
but not success
problem comes that frequency does not comes equal to "weekly" or
"Monthly" (combined)
Can anyone fix it
thanks
anil
I am using the query as(example)
Select * from Q1 where frequency=F1(WeekNo)
and using this function as
Function F1(WeekNo As Integer) As String
If WeekNo = 1 Then
F1 = "weekly" Or "Monthly"
ElseIf WeekNo = 2 Then
F1 = "weekly" Or "Quaterly"
ElseIf WeekNo = 3 Then
F1 = "weekly" Or "Annually"
Else
FrequencyNo = "weekly"
End If
End Function
Actually what I need is
Select * from Q1 where frequency = "weekly" or "Monthly"
if the weekNo is 1 which is calculated in Q1
I tried using
Select * from Q1 where Frequency = iif(IIf([Q1].[WeekNo])=1,"Monthly"or
"weekly",IIf([Q1].[WeekNo])=2,"Quaterly" or
"weekly",IIf([Q1].[WeekNo])=3,"Annually"or "weekly","Weekly")))
but not success
problem comes that frequency does not comes equal to "weekly" or
"Monthly" (combined)
Can anyone fix it
thanks
anil