-
Changing ODBC Message in SQL Server From MS Access
By Default, when U link an Access Database to Sql Server, using ODBC, the error messages that ODBC poses back to clients is usually not easily understood by client. What step by step procedure do I need to take to change the error messages in ODBC, SQL Server and Possibly MS Access.
Thank U.
-
What error message are you referring to?
Are you using VBA code to link the tables?
Boyd Trimmell aka HiTech Coach
Microsoft MVP - Access Expert
[SIGPIC][/SIGPIC]
Office Programming 25+ years as a Software Developer specializing in:
Business Process Management
Accounting/Inventory Control
Customer Relations Management (CRM)
Electronic Data Interchange (EDI)
-
Re-ODBC
I used ODBC from control panel to setup sql server and ms access.
What i mean is that ODBC error messages generated in ms access. For example, when u re through with a record and forgot to input data into the primary key column, in ms access, it will tell u to input data into the very column with a very easy and concise word that clients can understand easily, but in linked table to sql server, it will tell you alot of messages. I want to be able to change most of those message to an easy understood messages so that my client will not spend time trying to understand ODBC error messages.
Thnak U.
-
Why are you letting the back end generate the error messages to the user?
I use error handling and data validation in the front end to trap all errors/issues. This way I can handle the error/issues in a more user friendly manner. For example, I highlight the controls that have issues. IMHO, The error handling in the back end is just for backup of anything that slips through, not the primary handler.
Boyd Trimmell aka HiTech Coach
Microsoft MVP - Access Expert
[SIGPIC][/SIGPIC]
Office Programming 25+ years as a Software Developer specializing in:
Business Process Management
Accounting/Inventory Control
Customer Relations Management (CRM)
Electronic Data Interchange (EDI)
-
-
From PM;
Thanks for ur interest in my question.
As an access developer, I m interested in u sending me instruction on how to trap and write vba code that will enable me to change all the odbc languages to a user friendly understanding. thank u.
I do not try to change the " change all the odbc languages to a user friendly understanding". I am not sure if it is even possible to do ad the back end engine level.
What i do is use form validation (Form's Before Update event and Control's After Update event.) and form level error handling
This way my front end is not back end dependent.
Example using the Northwind.mdb database's Customer Form's Before update event:
Code:
Private Sub Form_BeforeUpdate(Cancel As Integer)
' perform data validation
If IsNull(Me.CompanyName) Then
MsgBox "You must enter a Company Name.", vbCritical, "Data entry error..."
DoCmd.GoToControl "CompanyName"
Cancel = True
End If
If Not Cancel Then
' passed the validation process
If Me.NewRecord Then
If MsgBox("Data will be saved, Are you Sure?", vbYesNo, "Confirm") = vbNo Then
Cancel = True
Else
' run code for new record before saving
End If
Else
If MsgBox("Data will be modified, Are you Sure?", vbYesNo, "Confirm") = vbNo Then
Cancel = True
Else
' run code before an existing record is saved
' example: update date last modified
End If
End If
End If
' if the save has been canceled or did not pass the validation , then ask to Undo changes
If Cancel Then
If MsgBox("Do you want to undo all changes?", vbYesNo, "Confirm") = vbYes Then
Me.Undo
End If
End If
End Sub
Boyd Trimmell aka HiTech Coach
Microsoft MVP - Access Expert
[SIGPIC][/SIGPIC]
Office Programming 25+ years as a Software Developer specializing in:
Business Process Management
Accounting/Inventory Control
Customer Relations Management (CRM)
Electronic Data Interchange (EDI)
-
Disable the Current Database Tab
I was wondering whether U have any idea on how I can disable the office ribbon button or better still, disable the access options button on the ribbon or better still, disable the current database tab in the access option when you click the access ribbon button and click the access options button and u will see the current database tab.
Thanks
-
Boyd Trimmell aka HiTech Coach
Microsoft MVP - Access Expert
[SIGPIC][/SIGPIC]
Office Programming 25+ years as a Software Developer specializing in:
Business Process Management
Accounting/Inventory Control
Customer Relations Management (CRM)
Electronic Data Interchange (EDI)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|