Microsoft Access
--
Questions
--
Followers
Top Experts
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
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
Zero AI Policy
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
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.
<<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.
or allow nulls in the field.
Jim.
SOLUTION
membership
Log in or create a free account to see answer.
Signing up is free and takes 30 seconds. No credit card required.
membership
Log in or create a free account to see answer.
Signing up is free and takes 30 seconds. No credit card required.
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.
<<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.






EARN REWARDS FOR ASKING, ANSWERING, AND MORE.
Earn free swag for participating on the platform.
Many thanks for your help, I have managed to amend the permission on the surname while keeping the validation that I requrie
Microsoft Access
--
Questions
--
Followers
Top Experts
Microsoft Access is a rapid application development (RAD) relational database tool. Access can be used for both desktop and web-based applications, and uses VBA (Visual Basic for Applications) as its coding language.