Hello,
I need some assistance with error handling in an Access 2003 Project
form. The project is has a data source connection to a SQL Server 2000
database. The main form is named ‘frmSelectByTest', and its subform's
‘Name' and ‘Source Object' properties are ‘frmSelectByTestSub'. The
‘Default View' on the main form is ‘Single Form', and on the sub form
is ‘Continuous Forms'.
The users select the name of a test (uniquely identified by a value
called ‘TestShortName) from a bound combo box in the main form. In the
subform, there is another bound combo box that allows the user to
select the student's name. After the student's name is selected, the
user indicates the student's score for the test in a bound text box
called ‘TestScore'. The last bound text box that the user fills in is
‘TestGrade' which indicates the grade level at which the student was
tested.
In the table that is populated, StudentID, TestGrade, and
TestShortName form a unique index. This SQL Server 2000 unique index
was created with IGNORE_DUP_KEY. None of these fields can be NULL.
Only TestScore can be null, and is not part of the unique index.
So for the users, each record in the subform must have at least the
student name selected and the TestGrade filled in. I have validation
rules and text set up for the TestGrade field, as the values can only
be ‘0' or ‘1' or ‘2' or ‘3' or ‘4' or ‘5'. When the user exits the
TestGrade field, I need to save the record. If there is an error of
any kind, I need for the application to ignore any messages from SQL
Server so that I can express a singular custom message (for any error
event).
How can I do this?
Thank you for your help!
CSDunn 2 1970
Am Mon, 12 Jul 2004 14:15:52 -0700 schrieb CSDunn: Hello, I need some assistance with error handling in an Access 2003 Project form. The project is has a data source connection to a SQL Server 2000 database. The main form is named ‘frmSelectByTest', and its subform's ‘Name' and ‘Source Object' properties are ‘frmSelectByTestSub'. The ‘Default View' on the main form is ‘Single Form', and on the sub form is ‘Continuous Forms'.
The users select the name of a test (uniquely identified by a value called ‘TestShortName) from a bound combo box in the main form. In the subform, there is another bound combo box that allows the user to select the student's name. After the student's name is selected, the user indicates the student's score for the test in a bound text box called ‘TestScore'. The last bound text box that the user fills in is ‘TestGrade' which indicates the grade level at which the student was tested.
In the table that is populated, StudentID, TestGrade, and TestShortName form a unique index. This SQL Server 2000 unique index was created with IGNORE_DUP_KEY. None of these fields can be NULL. Only TestScore can be null, and is not part of the unique index.
So for the users, each record in the subform must have at least the student name selected and the TestGrade filled in. I have validation rules and text set up for the TestGrade field, as the values can only be ‘0' or ‘1' or ‘2' or ‘3' or ‘4' or ‘5'. When the user exits the TestGrade field, I need to save the record. If there is an error of any kind, I need for the application to ignore any messages from SQL Server so that I can express a singular custom message (for any error event).
How can I do this?
Thank you for your help!
CSDunn
Hello,
maybe you give the forms Error-Event (I think here you can examine
the Error Messages and display a custom error message) a chance or
use the grade fields "On Exit Event" or the forms "before Update"
Event to check the values of the fields and cancel the Update.
HTH
Karpi
<fluctuat nec mergitur>
Thank you for your help. I will look into this.
CSDunn
Hans-Joerg Karpenstein <hj***********@web.de> wrote in message news:<pa****************************@web.de>... Am Mon, 12 Jul 2004 14:15:52 -0700 schrieb CSDunn:
Hello, I need some assistance with error handling in an Access 2003 Project form. The project is has a data source connection to a SQL Server 2000 database. The main form is named ?frmSelectByTest', and its subform's ?Name' and ?Source Object' properties are ?frmSelectByTestSub'. The ?Default View' on the main form is ?Single Form', and on the sub form is ?Continuous Forms'.
The users select the name of a test (uniquely identified by a value called ?TestShortName) from a bound combo box in the main form. In the subform, there is another bound combo box that allows the user to select the student's name. After the student's name is selected, the user indicates the student's score for the test in a bound text box called ?TestScore'. The last bound text box that the user fills in is ?TestGrade' which indicates the grade level at which the student was tested.
In the table that is populated, StudentID, TestGrade, and TestShortName form a unique index. This SQL Server 2000 unique index was created with IGNORE_DUP_KEY. None of these fields can be NULL. Only TestScore can be null, and is not part of the unique index.
So for the users, each record in the subform must have at least the student name selected and the TestGrade filled in. I have validation rules and text set up for the TestGrade field, as the values can only be ?0' or ?1' or ?2' or ?3' or ?4' or ?5'. When the user exits the TestGrade field, I need to save the record. If there is an error of any kind, I need for the application to ignore any messages from SQL Server so that I can express a singular custom message (for any error event).
How can I do this?
Thank you for your help!
CSDunn
Hello,
maybe you give the forms Error-Event (I think here you can examine the Error Messages and display a custom error message) a chance or use the grade fields "On Exit Event" or the forms "before Update" Event to check the values of the fields and cancel the Update.
HTH Karpi <fluctuat nec mergitur> This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Jim |
last post by:
Hi,
I keep getting form results emailed to me that would indicate a form
from my web site is getting submitted with all fields blank or empty,
but my code should preventing users from proceeding...
|
by: xtra |
last post by:
Hi Folk
I have about 1000 procedures in my project. Many, many of them are along
the lines of
function myfuntion () as boolean
on error goto er
'-
Dim Dbs as dao.database
Dim Rst as...
|
by: Rudy Ray Moore |
last post by:
Whenever I get any error with Vc++7.1/.net/2003, it is followed by huge
ammounts of "template assistance" error messaging referencing template code
(MTL) that has nothing to do with the error.
...
|
by: Stefan Johansson |
last post by:
Hi all
I'am moving from Visual Foxpro and have a question
regarding "best practice" error handling in vb .net.
In VFP I have always used a "central" error handling
object in order to have a...
|
by: Al Williams |
last post by:
Hi,
I have error handling in place throughout my application. I also start the
application wrapped in error handling code to catch any unexpected
exceptions (i.e. exceptions that occur where I...
|
by: Anthony England |
last post by:
(sorry for the likely repost, but it is still not showing on my news server
and after that much typing, I don't want to lose it)
I am considering general error handling routines and have...
|
by: ===Steve L.=== |
last post by:
does anyone know any site or ariticle provides exmaple for building a
Global Error Handling Module in VB.Net? the module should be able to
1. prouduce friendly generic error msg for the users and...
|
by: Lysander |
last post by:
Thought I would give something back with a few articles. This article is a bit of code to add error handling. When I have time, I want to write articles on multilingual databases, and Access...
|
by: MrDeej |
last post by:
Hello guys!
We have an SQL server which sometimes makes timeouts and connection errors. And we have an function witch writes and updates data in 2 tables on this server. When the SQL server error...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
| |