User Profile
Collapse
-
Yes, you both were helpful! -
That did it! Thank you both for your patience! I really appreciate it. Learning on the fly and under the gun I guess sometimes has it's advantages.Leave a comment:
-
I apologize for my ignorance but appreciate your help. However, when I do as you state above:
Code:DCount("*", "Accounts", "GroupNo = "' & keyNow & ')
Leave a comment:
-
Hi Rabbit,
I made several attempts changing where the quotes should be and finally was successful with this:
Code:If Nz(DCount("*", "Accounts", "Location<>'0' and GroupNo = ' & keyNow & '"), 0) <> 0 Then bHasLocs = True
Leave a comment:
-
The object doesn't contain the automation object
Hello, Would someone please be able to help me. I had to change a key field (GroupNo) in a table from Numeric to Text. This has cause all kinds of problems in code in a database I did not write but am trying to help fix. This field is referenced everywhere so expressions and functions, etc. are all now having to be reviewed and updated. Currently I am getting this error:
The expression you entered as a query parameter produced... -
Thanks Stewart. The single quotes fixed one issue but now errors are occurring in other parts of the code. :( I'll post new threads for those. Appreciate your help!Leave a comment:
-
Okay great. I will try and let you know what happens. Thank you!Leave a comment:
-
Oh and I also tried to change the ByRef for keyNow from variant to string but I must have done it wrong because I'm still getting errors.Leave a comment:
-
Hi Stewart,
I had already tried that but still received an error. Yes I had found that because keyNow is a Variant that Access will convert based on the value. GroupNo will always be data type TEXT (String) so for instance, whether keyNow value is 0 (varientInteger ) or 2540 (variantDouble or variantLong) or K006 (variantString) or whatever, I think it is erring because it's not an exact data type match, thus the reason for the "mismatch"...Leave a comment:
-
Run time error 3464 Type mismatch in criteria expression
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.
Code:Public Function doQueryDefSQL(ByRef fromWhere As String, Optional keyNow As Variant = 0) As Boolean ... If fromWhere <> "Clicked"
Last edited by Rabbit; Jul 2 '15, 03:18 AM. Reason: Please use [code] and [/code] tags when posting code or formatted data.
No activity results to display
Show More
Leave a comment: