I have created a function (Module)called mID, I would like to have the value returned in a query. When I use the expression builder and just choose this funciton it says I have the wrong number of arguemnts.
mID is:
Public Function mID() As String
If Not IsNull(DLookup("Customer #", "Query1")) Then
mID = "Query1"
ElseIf Not IsNull(DLookup("Customer #", "Query2")) Then
mID = "Query2"
ElseIf Not IsNull(DLookup("Customer #", "Query3")) Then
mID = "Query3"
ElseIf Not IsNull(DLookup("Customer #", "Query4")) Then
mID = "Query4"
ElseIf Not IsNull(DLookup("Customer #", "Query5")) Then
mID = "Query5"
ElseIf Not IsNull(DLookup("Customer #", "Query6")) Then
mID = "Query6"
End If
Exit Function
End Function
Can someone advise what I am missing? I don't want to link all 6 queries...
Thanks a million!
mID is:
Public Function mID() As String
If Not IsNull(DLookup("Customer #", "Query1")) Then
mID = "Query1"
ElseIf Not IsNull(DLookup("Customer #", "Query2")) Then
mID = "Query2"
ElseIf Not IsNull(DLookup("Customer #", "Query3")) Then
mID = "Query3"
ElseIf Not IsNull(DLookup("Customer #", "Query4")) Then
mID = "Query4"
ElseIf Not IsNull(DLookup("Customer #", "Query5")) Then
mID = "Query5"
ElseIf Not IsNull(DLookup("Customer #", "Query6")) Then
mID = "Query6"
End If
Exit Function
End Function
Can someone advise what I am missing? I don't want to link all 6 queries...
Thanks a million!