Hello, I am trying to fix a db that was written by someone else. I had to change a key field (GroupNo) in a table from Numeric to Text and am now coming up with data type mismatch. In this part of the code keyNow has been defined as Variant = 0. Error is thrown on the DLookup line.
...
Much thanks!
Shar
Code:
Public Function doQueryDefSQL(ByRef fromWhere As String, Optional keyNow As Variant = 0) As Boolean ... If fromWhere <> "Clicked" Then 'Opened If Nz(DCount("*", "Accounts", "Location='0'"), 0) = 2 Then keyNow = DLookup("GroupNo", "Accounts", "GroupNo<>0") Else keyNow = getDefault("GroupNo") End If End If
Much thanks!
Shar
Comment