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 this error: 'The object doesn't contain the Automation object 'K006."
It is occurring on this line of code:
When I click OK then this error is thrown:
Run-time error '0': Reserved Error
keyNow is returning as a VariantString of "K006"
This is urgently needed today if anyone can assist.
Much thanks!
The expression you entered as a query parameter produced this error: 'The object doesn't contain the Automation object 'K006."
It is occurring on this line of code:
Code:
Public Function doQueryDefSQL(ByRef fromWhere As String, Optional keyNow As Variant = "") As Boolean
Dim bHasLocs As Boolean
'more code here...
If Nz(DCount("*", "Accounts", "Location<>'0' and GroupNo = " & keyNow), 0) > 0 Then bHasLocs = True
Run-time error '0': Reserved Error
keyNow is returning as a VariantString of "K006"
This is urgently needed today if anyone can assist.
Much thanks!
Comment