By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,650 Members | 1,996 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,650 IT Pros & Developers. It's quick & easy.

Need Assistance with Error Handling

P: n/a
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
Nov 13 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
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>
Nov 13 '05 #2

P: n/a
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>

Nov 13 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.