I'm using Access with Oracle, a DLookup I'm using is not returning expected results.
The DLookup below returns count=0 when it should return count = 1.
Me.txtUserExistsFlg = DCount("LoginName", "Users", "LoginName = '" & Me.txtUserName & " ' ") <-- doesn't work
Note that the table "Users" points to the Oracle table.
Me.txtUserName in the debugger looks like this: "wpeck", including the double-quote marks.
If I hard-code the DLookup to
Me.txtUserExistsFlg = DCount("LoginName", "Users", "LoginName = 'wpeck'") <-- works with literal 'wpeck'
then it works fine.
In Oracle the name is lowercase, wpeck.