Run-time error '3085':
Undefined function <function name> in expression.
Undefined function <function name> in expression.
Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.
View products that this article applies to.
Function IsInternational(strCountry As String) As String
If strCountry = "USA" Then
IsInternational = "Local"
Else
IsInternational = "Intl"
End If
End Function
Query: qryExcelTest -------------------------------------- Type: Select Query Field: CompanyName Table: Customers Field: Country Table: Customers Field: Expr1: IsInternational([Country])
Sub xlTest()
Dim db As Database, rs1 As Recordset
Dim qry As QueryDef
Set db = Workspaces(0).OpenDatabase _
("C:\Program Files\Microsoft Office\Office\Samples\Northwind.mdb")
' Replace the above path with the correct path to the
' sample Northwind.mdb database on your computer.
Set qry = db.QueryDefs("qryExcelTest")
Set rs1 = qry.OpenRecordset
rs1.MoveLast
rs1.Close
db.Close
End Sub
Keywords: KB209864, kbprb, kbprogramming, kberrmsg