473,418 Members | 2,072 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,418 software developers and data experts.

Need Assistance with Error Handling

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
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>
Nov 13 '05 #2
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
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...
106
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...
2
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. ...
3
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...
4
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...
10
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...
2
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...
0
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...
9
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
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...
0
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...
0
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...
0
Oralloy
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,...
0
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...
0
tracyyun
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...
0
agi2029
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,...
0
isladogs
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...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.