473,480 Members | 2,592 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

How to display an error message

I'm using A97. Table1 and table2 are related with a one to many relationship
of a text field. Table2 has the primary key which is indexed with no
duplicates. A data entry form for table1 gets the foreign key from a combo box
lookup of table2. Besides the primary key in table2, there are 2 other fields
that are used in reports. If the desired record is not in the lookup table, a
click on a command button opens a form to add a new record. If the primary key
for the new record is a duplicate for an existing primary key, the new record
is not saved. But there is nothing that warns that the primary key already
exists. How can I display a message box that shows a record for that primary
key already exists?

Just a wizard prodder
Chuck
Nov 13 '05 #1
2 1867
Chuck wrote:
I'm using A97. Table1 and table2 are related with a one to many
relationship of a text field. Table2 has the primary key which is
indexed with no duplicates. A data entry form for table1 gets the
foreign key from a combo box lookup of table2. Besides the primary
key in table2, there are 2 other fields that are used in reports. If
the desired record is not in the lookup table, a click on a command
button opens a form to add a new record. If the primary key for the
new record is a duplicate for an existing primary key, the new record
is not saved. But there is nothing that warns that the primary key
already exists. How can I display a message box that shows a record
for that primary key already exists?

Just a wizard prodder
Chuck


Do you have warnings turned off in options? Attempting to insert a duplicate
primary key should give you an error.

--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com
Nov 13 '05 #2
On Thu, 26 May 2005 07:41:20 -0400, Chuck <li*****@schoollink.net> wrote:

I was making too much of a big deal of it.
Validation rule: <>[primary key field].

Just a wizard prodder
Chuck
--
I'm using A97. Table1 and table2 are related with a one to many relationship
of a text field. Table2 has the primary key which is indexed with no
duplicates. A data entry form for table1 gets the foreign key from a combo box
lookup of table2. Besides the primary key in table2, there are 2 other fields
that are used in reports. If the desired record is not in the lookup table, a
click on a command button opens a form to add a new record. If the primary key
for the new record is a duplicate for an existing primary key, the new record
is not saved. But there is nothing that warns that the primary key already
exists. How can I display a message box that shows a record for that primary
key already exists?

Just a wizard prodder
Chuck


Nov 13 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
3632
by: austinJim | last post by:
IIS has quit displaying ASP errors it finds. Errors from SQL Server are displayed as are "page not found" errors but VBScript syntax errors are not. For example, the following code should give the...
3
51958
by: Kim Haines | last post by:
I need help finding where an error is occuring in my code. I use a try-catch block like this in my global.asa: try { //my code } catch (e) { Application('errormsg') = ("An exception...
9
1966
by: Wally | last post by:
I am trying to display images from an Access 2000 database and I get an error "Invalid Parameter Used" when I execute the code line "picBLOB.Image = Image.FromStream(stmBLOBData)" in my Visual...
19
6849
by: dmiller23462 | last post by:
Hi guys....I have absolutely NO IDEA what I'm doing with Javascript but my end result is I need two text boxes to stay hidden until a particular option is selected....I've cobbled together the...
3
4764
by: Steve - DND | last post by:
I was wondering if anyone can point me to some articles or practices they use for dealing with errors in their applications; particularly in an n-tier design. I am trying to find one way to...
18
3321
by: Alpha | last post by:
Hi, I'm working on a Windows applicaton with VS 2003 on windows 2000. I have a listbox that I have binded to a dataset table, "source" which has 3 columns. I would like to display 2 of those...
3
1587
by: KJ | last post by:
Alright, I'm trying to display Ex.Message on a custom error page. Here is what I did. When an error occured I caught the error and saved it in a session variable and when the page redirected...
2
6256
by: c676228 | last post by:
Hi, I have several user controls like email, phone,ssn etc. each has it's own validation message in its user control already. When I bring all those user controls in an aspx page, I would like to...
4
6358
by: Mike L | last post by:
Error occurs on "System.Deployment.Application.ApplicationDeployment.CurrentDeployment" ** Here is my code private void frmMain_Load(object sender, System.EventArgs e) {...
3
2233
by: c676228 | last post by:
Hi everyone, I have a piece of code in sales.aspx.vb like this: Protected WithEvents Message As System.Web.UI.WebControls.Label Try ... ChartImage.ImageUrl = "ChartGenerator.aspx?" + DataStr +...
0
6920
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
7060
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
7106
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
5365
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,...
1
4799
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...
0
4501
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3013
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
572
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
206
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.