A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Getting rid of messages in a multiple index setting...



 
 
Thread Tools Display Modes
  #1  
Old February 1st, 2005, 08:53 AM
tunacat
external usenet poster
 
Posts: n/a
Default Getting rid of messages in a multiple index setting...

I have a table that I've set up with multiple indexes in order to eliminate
duplicate fields. However, when the user tries inadvertently adds a
duplicate, there are several message boxes that pop up. I would just like
the one box explaining the mistake. How do I get rid of all the message
boxes? Thanks for your help in advance!

Melanie
  #2  
Old February 1st, 2005, 01:44 PM
Jeff Boyce
external usenet poster
 
Posts: n/a
Default

Melanie

Are you saying that one message pops up for each "duplicate"? Or are you
saying that for a single duplicate, multiple messages pop up?

What does the message box(es) say?

One approach to (temporarily!) turning off the pop-up message that informs
the user there is a duplicate index value and it won't be added is to turn
the warnings off. I say TEMPORARILY! because you absolutely want to know if
anything else isn't working correctly, so you could turn warnings off during
the addition.

To do this, you'd probably need to be working in a form, so you could
control the process (you really don't want to expose the users to the tables
directly). Take a look at Access HELP on SetWarnings.

Another approach would be to do some checking behind the scenes on the form
and never even attempt to save the duplicate information. This might be
friendlier than letting the user enter all the info and THEN tell them
they've duplicated something already in the database.

--
Good luck

Jeff Boyce
Access MVP

"tunacat" wrote in message
...
I have a table that I've set up with multiple indexes in order to

eliminate
duplicate fields. However, when the user tries inadvertently adds a
duplicate, there are several message boxes that pop up. I would just like
the one box explaining the mistake. How do I get rid of all the message
boxes? Thanks for your help in advance!

Melanie


  #3  
Old February 1st, 2005, 05:11 PM
tunacat
external usenet poster
 
Posts: n/a
Default

Thanks Jeff! How would I go about your second approach? I think it would be
best to prevent someone from having to type in everything only to be told the
data is already existing. I still need it prevent duplication only if
multiple fields are the same. (ex. if the same Date field and Shift Field
have already been entered, we can't let them put it in again)

"Jeff Boyce" wrote:

Melanie

Are you saying that one message pops up for each "duplicate"? Or are you
saying that for a single duplicate, multiple messages pop up?

What does the message box(es) say?

One approach to (temporarily!) turning off the pop-up message that informs
the user there is a duplicate index value and it won't be added is to turn
the warnings off. I say TEMPORARILY! because you absolutely want to know if
anything else isn't working correctly, so you could turn warnings off during
the addition.

To do this, you'd probably need to be working in a form, so you could
control the process (you really don't want to expose the users to the tables
directly). Take a look at Access HELP on SetWarnings.

Another approach would be to do some checking behind the scenes on the form
and never even attempt to save the duplicate information. This might be
friendlier than letting the user enter all the info and THEN tell them
they've duplicated something already in the database.

--
Good luck

Jeff Boyce
Access MVP

"tunacat" wrote in message
...
I have a table that I've set up with multiple indexes in order to

eliminate
duplicate fields. However, when the user tries inadvertently adds a
duplicate, there are several message boxes that pop up. I would just like
the one box explaining the mistake. How do I get rid of all the message
boxes? Thanks for your help in advance!

Melanie



  #4  
Old February 2nd, 2005, 01:58 PM
Jeff Boyce
external usenet poster
 
Posts: n/a
Default

Melanie

A couple ideas come to mind...

You could force completion of the "suspect" controls first by disabling all
the other controls until after the suspects have been completed (and
tested). To test, you'd write a small snippet of code that tries to find
existing records with the values on the form. If it finds any (i.e., 1),
you'd cancel the process and inform the user that what s/he entered already
exists. This is slightly less obnoxious than entering ALL the data.

Another approach would be to use combo boxes for the suspect controls, and
set the LimitToList property to Yes. If the user entered something already
in the database, the control would display it, a visual indication that they
need to use something else. If you use the NotInList event too, you provide
a way to enter a new (not-in-the-list) value.

--
Good luck

Jeff Boyce
Access MVP

"tunacat" wrote in message
...
Thanks Jeff! How would I go about your second approach? I think it would

be
best to prevent someone from having to type in everything only to be told

the
data is already existing. I still need it prevent duplication only if
multiple fields are the same. (ex. if the same Date field and Shift

Field
have already been entered, we can't let them put it in again)

"Jeff Boyce" wrote:

Melanie

Are you saying that one message pops up for each "duplicate"? Or are

you
saying that for a single duplicate, multiple messages pop up?

What does the message box(es) say?

One approach to (temporarily!) turning off the pop-up message that

informs
the user there is a duplicate index value and it won't be added is to

turn
the warnings off. I say TEMPORARILY! because you absolutely want to

know if
anything else isn't working correctly, so you could turn warnings off

during
the addition.

To do this, you'd probably need to be working in a form, so you could
control the process (you really don't want to expose the users to the

tables
directly). Take a look at Access HELP on SetWarnings.

Another approach would be to do some checking behind the scenes on the

form
and never even attempt to save the duplicate information. This might be
friendlier than letting the user enter all the info and THEN tell them
they've duplicated something already in the database.

--
Good luck

Jeff Boyce
Access MVP

"tunacat" wrote in message
...
I have a table that I've set up with multiple indexes in order to

eliminate
duplicate fields. However, when the user tries inadvertently adds a
duplicate, there are several message boxes that pop up. I would just

like
the one box explaining the mistake. How do I get rid of all the

message
boxes? Thanks for your help in advance!

Melanie




 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Rule for multiple messages [email protected] Outlook Express 3 January 27th, 2005 12:20 AM
Multiple Messages Once Again Jerry General Discussion 0 January 19th, 2005 11:43 PM
"Add to Junk Sender List" for multiple messages? tiki2k General Discussion 1 July 29th, 2004 07:06 AM
Restoring Messages after using Compact Folder Arnold Outlook Express 2 July 20th, 2004 12:48 PM
Sending Error 0X004210B & 0X800CCC0B - sending multiple messages Phil General Discussion 0 June 21st, 2004 05:05 AM


All times are GMT +1. The time now is 12:57 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.