Compile error in table level validation expression in Office 2013

Iskariot

New member
Local time
Today, 23:30
Joined
Feb 8, 2019
Messages
5
Hello group.
I'm new here so excuse me for any mistakes I may do. I searched everywhere to find an answer but all lead to the same, no help procedure. After formating two work pcs and installing Office 2013 I get the message "Compile error in table level validation expression " followed by error number 2950 when I click on a buton in an access file. I tried every solution I found on the web including compact and repair database, adding the files folder in trusted location, deleting and re-creating the problematic table and macro. The pc is newly formated so I m sure there is no problem there. Before the format everything worked perfectly having Office 2007. As I said that happenes in 2 pcs. Any help would be most welcome. Thanks in advance.
 

Attachments

  • screen.jpg
    screen.jpg
    91.4 KB · Views: 166
You need to supply the code you are using - and you need to highlight which line is generating the error. Copy paste the code and use the code tags. Do not send a screenshot

As access has matured, it has become less tolerant of poorly written code which might explain why it errors in 2013 and not 2007.

It may not have any bearing but things like spaces in field names and using reserved words can cause a problem but generate a misleading error
 
Dear Cj LONDON


Thanks for replying so fast. Unfortunately I cant make the code public since it belongs to the Greek fire department and... well its illegal.:D But at least now i kinda know where to focus. Thanks again for your help!
 
I cant make the code public since it belongs to....

For future reference what you do is you create a small demo database that Just demonstrates the issue you are having. There's no need to reveal any of your bespoke code.

Sent from my SM-G925F using Tapatalk
 
If you look in the table in design view, there is a section at the bottom that changes as you highlight each different field. You should be able to step through that and find where there is any kind of validation code. I can't believe that EVERY field has validation code so it should be a limited set of fields.

If you can't easily demonstrate the problem with a contrived database, then take screen shots of every field that has validation code and use the PAINT utility to crop away the rest of the screen shot.

By the way, you should check with your boss as to whether it would be legal to show the code as long as you didn't show any data. I had similar restrictions before I retired because the U.S. Navy personnel systems have all sorts of security restrictions. But I cleared the idea with the security chief and was able to post some things. In my past experience, it is always possible to post isolated snippets that show no personal data, particularly if the snippet is also too small to reveal any "secrets" of the code.
 
I asked my chief and he was negative as to show the code. I don't think it's wrong to do but he said so so I have to follow the order. Nevertheless I'll try to do what you suggested above and sent only the parts that are problematic.
 
Normally sensitivity is about posting data (understandably). Can't see any issue with code but I'd like to be appraised.
 
Bit like someone calling 999 and saying there is a fire.

Where is the fire, you would be asked.

'I can't tell you that' :)
 
As to finding your culprit, the usual cause for problems with validation rules is that you try to do too much in the field validation statement.

Here is a quickie reference that talks about the ways you can build a validation rule:

https://support.office.com/en-us/ar...on-rules-b91c6b15-bcd3-42c1-90bf-e3a0272e988d

Note that it is possible to place a validation rule on a form that can apply far more complex tests than could be done purely in a table validation.
 
Iskariot,

One suggestion for dealing with your boss, use an email clearly specifying what you want to post and annotating that this is to resolve the issues. Once your boss needs to put down in writing that they are not allowing you to do something, it becomes more difficult for them to hold it against you when the problem isn't resolved as quickly as they like.

Without surrounding code, most pieces are of little value. This become more true when you show the code but use different names for fields to make identifying the type of field easier.
 

Users who are viewing this thread

Back
Top Bottom