Guest_imported
New member
- Jan 1, 1970
- 0
I've been trying for a week to get the code listed below to work. I keep getting an Undefined function 'Other'error (3085). When I get the error message, and I press the 'Debug' button, the Set statement is highlighted.
Set RSOth = DbOth.OpenRecordset("SELECT COUNT([DetailLines].[AccNum])
AS OTH1
FROM [DetailLines] WHERE (((([DetailLines].[quadrant])=1))
and ((Others([DetailLines].[CD Code])=TRUE)))"
====================================================
Private Function Others(invar As String) As Boolean
Select Case invar
Case "ANML", "HO", "LTWL", "OBJ", "OFF", "OTH",
"OTRN", "PC", "PED", "RA", "RALT", "RART",
"RE", "RTOR", "RTWL", "SSOD", "SSSD"
Others = True
Case Else
Others = False
End Select
End Function
=====================================================
If this won't work, I'd appreciate any alternative suggestion.
Set RSOth = DbOth.OpenRecordset("SELECT COUNT([DetailLines].[AccNum])
AS OTH1
FROM [DetailLines] WHERE (((([DetailLines].[quadrant])=1))
and ((Others([DetailLines].[CD Code])=TRUE)))"
====================================================
Private Function Others(invar As String) As Boolean
Select Case invar
Case "ANML", "HO", "LTWL", "OBJ", "OFF", "OTH",
"OTRN", "PC", "PED", "RA", "RALT", "RART",
"RE", "RTOR", "RTWL", "SSOD", "SSSD"
Others = True
Case Else
Others = False
End Select
End Function
=====================================================
If this won't work, I'd appreciate any alternative suggestion.