undefined function ERROR when using domain functions (1 Viewer)

vba_php

Forum Troll
Local time
Today, 00:09
Joined
Oct 6, 2019
Messages
2,880
I'm getting this error when using any domain function in the query editor. this is new after buying office 365. I did a little googling on it, but what was returned did yield any insight. I don't think this is relevant, but my VBA references include MS Access library 16.0 and MS Office library 16.0.

Anybody else have this happen? It also happens using domain functions where there is no WHERE argument, but just the field and table arguments only.
 

Attachments

  • undefined function.jpg
    undefined function.jpg
    82 KB · Views: 103

Ranman256

Well-known member
Local time
Today, 01:09
Joined
Apr 9, 2015
Messages
4,339
when you get an error you KNOW exists, then it could be 2 things:
1. your database is almost full (2 gig). Access gets senile when its full.

2. in VBE,(alt-F11) , tool, references. See if there is a MISSING item checked.
if so, uncheck it.

and the 3rd thing, it could me missing the Access library in references.
 

vba_php

Forum Troll
Local time
Today, 00:09
Joined
Oct 6, 2019
Messages
2,880
when you get an error you KNOW exists, then it could be 2 things:
1. your database is almost full (2 gig). Access gets senile when its full.

2. in VBE,(alt-F11) , tool, references. See if there is a MISSING item checked.
if so, uncheck it.

and the 3rd thing, it could me missing the Access library in references.
Ranman,

Thanks. Unfortunately I did cover everything you've talked about before I posted this. and the test I ran, which is what is shown in the image attachment, was on a database 400K in size. I table and 1 query. :(
 

June7

AWF VIP
Local time
Yesterday, 21:09
Joined
Mar 9, 2014
Messages
5,463
Sorry, I don't have Office365.

I don't get "undefined function" error but do get wrong result if field name is not within brackets because field name is a number.

Why lookup in same field used in criteria?
 

vba_php

Forum Troll
Local time
Today, 00:09
Joined
Oct 6, 2019
Messages
2,880
Why lookup in same field used in criteria?
It doesn't matter what is looked up June. The screenshot is just of a test I ran to check on the errors occurance. and I don't believe the field name matters either, because the numbers are surrounded in double quotes, which turns it into a string anyway. Aren't I correct?
 

isladogs

MVP / VIP
Local time
Today, 06:09
Joined
Jan 14, 2017
Messages
18,209
As Ranman said, DLookup is in the default Access reference library.
If you've checked and that is ticked, then open the VBE, click F2 to go to the Object Browser and type DLookup. You should see this


If not and it just happens in this one database, its probably corrupted.
If it happens in all databases, I would reinstall Access
 

Attachments

  • Capture.PNG
    Capture.PNG
    19.8 KB · Views: 317

June7

AWF VIP
Local time
Yesterday, 21:09
Joined
Mar 9, 2014
Messages
5,463
True, doesn't matter for this particular issue. However, fieldname that is a number or reserved word or contains space/punctuation/special characters will not work properly without []. Wrong result is returned or causes "missing operator" error.
 

vba_php

Forum Troll
Local time
Today, 00:09
Joined
Oct 6, 2019
Messages
2,880
let me check on what you guys mention. I'll get back to you. thanks.
 

vba_php

Forum Troll
Local time
Today, 00:09
Joined
Oct 6, 2019
Messages
2,880
ok guys,

Colin you must have been right. Somehow the one file must be the offender. I ran 3 tests using different tables and queries and dlookup() in each one of them. each domain function had a WHERE argument as well, and no numbers were used as field names this time around.
 

Attachments

  • db 1 test - error thrown.jpg
    db 1 test - error thrown.jpg
    84.7 KB · Views: 105
  • db 2 test - success.jpg
    db 2 test - success.jpg
    105.3 KB · Views: 90
  • db 3 test - success.jpg
    db 3 test - success.jpg
    101.3 KB · Views: 92

Users who are viewing this thread

Top Bottom