K
Kathleen
I have had several queries corrupt over a period of
months. The lastest one involves a very simple VB module
that converts one number to another using a case
statement. That value is returned in the query. When I
attempt to filter out the value of 3 for the query, I get
a data type mismatch error. Help!
Case Statement:
Option Compare Database
Function CalculateOverall(Question_5 As Integer) As Integer
Select Case Question_5
Case 1
TempValue = 5
Case 2
TempValue = 4
Case 3
TempValue = 3
Case 4
TempValue = 2
Case 5
TempValue = 1
End Select
CalculateOverall = TempValue
End Function
Query:
SELECT [LLC Customer Survey].[Submitted Date], [LLC
Customer Survey].[Activity Number], CalculateOverall
([Question_5]) AS Question5
FROM [LLC Customer Survey]
WHERE ((([LLC Customer Survey].[Submitted Date]) Between
#8/1/2003# And #8/31/2003#) AND ((CalculateOverall
([Question_5]))<>3) AND (([LLC Customer Survey].[Activity
Type ID]) Not Like "EX-*"));
months. The lastest one involves a very simple VB module
that converts one number to another using a case
statement. That value is returned in the query. When I
attempt to filter out the value of 3 for the query, I get
a data type mismatch error. Help!
Case Statement:
Option Compare Database
Function CalculateOverall(Question_5 As Integer) As Integer
Select Case Question_5
Case 1
TempValue = 5
Case 2
TempValue = 4
Case 3
TempValue = 3
Case 4
TempValue = 2
Case 5
TempValue = 1
End Select
CalculateOverall = TempValue
End Function
Query:
SELECT [LLC Customer Survey].[Submitted Date], [LLC
Customer Survey].[Activity Number], CalculateOverall
([Question_5]) AS Question5
FROM [LLC Customer Survey]
WHERE ((([LLC Customer Survey].[Submitted Date]) Between
#8/1/2003# And #8/31/2003#) AND ((CalculateOverall
([Question_5]))<>3) AND (([LLC Customer Survey].[Activity
Type ID]) Not Like "EX-*"));