• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 729
  • Last Modified:

ODBC--call failed error Access 2016/SQL

Hi

I am having an issue with Access 2016.  When users try to save when they first input details into the emergency contact tab they receive an ODBC call failed error (screen shot attached).  This database has an SQL 2008 R2 back end and I have checked the SQL table and the Surname exists in ServiceUsers so the value is not null.

If a user closes the tab by using the x button in the top right hand corner the details do save to the table.  Is there a way to prevent this error occurring?

Any help would be gratefully received
thanks
H--alpha.JPG
0
ernie10
Asked:
ernie10
  • 2
  • 2
  • 2
2 Solutions
 
Vitor MontalvãoMSSQL Senior EngineerCommented:
As the error says you're trying to insert a NULL value in a field named Surname that requires a values (can't be empty). So tell the user to provide a surname so he or she don't receive the error anymore.
0
 
Jim Dettman (Microsoft MVP/ EE MVE)PresidentCommented:
<<So tell the user to provide a surname so he or she don't receive the error anymore.>>

 or allow nulls in the field.

Jim.
0
 
ernie10Author Commented:
Hi Vitor

Thanks for the reply,  I am sorry but I don't quite understand.  

For any new client they set up the Surname before they can get to this stage and it is a mandatory field so can not be null (I have checked in the SQL table and it is showing)  and is saved in the table.

There is no other place to enter a second surname on this table or linked tables.  This is only an issue the first time they try to enter the emergency contact details on that tab.  

Please can you elaborate further.

Many thanks
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
Vitor MontalvãoMSSQL Senior EngineerCommented:
For any new client they set up the Surname before they can get to this stage and it is a mandatory field so can not be null (I have checked in the SQL table and it is showing)  and is saved in the table.

 There is no other place to enter a second surname on this table or linked tables.  This is only an issue the first time they try to enter the emergency contact details on that tab.  
Then this might be a bug in the application. Somehow is trying to add a new record with no surname. You may need to debug the code to see it as we don't have access to the code.
0
 
Jim Dettman (Microsoft MVP/ EE MVE)PresidentCommented:
One important point:

<<If a user closes the tab >>

 If your using a main form with subforms, be aware that Access saves the main form record as soon as you enter a subform.

 So if they have not filled in the surname on the main form, then try to enter emergency contact details by clicking into a subform, you'd get the error.

 Is that the setup you have or something else?

Jim.
0
 
ernie10Author Commented:
Many thanks for your help,  I have managed to amend the permission on the surname while keeping the validation that I requrie
0

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

  • 2
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now