Yes (No Duplicates)

Hi Bob,
I have done as you suggested The message bar setting for all office application has two options:
1. Show the Message Bar in all application when content has been block. This has been ticked
2. Never show information about blocked content. Un-ticked.
I just tried ticking the other option (#2)- no difference.
Any other ideas of what i might be doing wrong?

#1 is the one that should be ticked and NOT #2. But it also needs to be in a Trusted Location. If you haven't done that you should find a button available to enable code when you open the database.

See here for more about that:
http://www.btabdevelopment.com/ts/default.aspx?PageId=13
 
As I said earlier I don't believe waiting for the error is the best approach to the problem.

Better to check for the duplicate before you attempt to add the record. This is very easily done with a DLookUp.

While I can't argue with your logic, it would be nice to solve this problem.
 
As I said earlier I don't believe waiting for the error is the best approach to the problem.

Better to check for the duplicate before you attempt to add the record. This is very easily done with a DLookUp.

I would agree but it would appear that perhaps code is not running at all at the moment for the OP and therefore ANY solution isn't going to work until they get that resolved.
 
Bob

I just had a look at your web site. I havn't been there for quite some time.

It certainly looks better than the old one. Good to see.
 
Thanks guys/gals??
As I indicated this is a work computer as such wouldn't the Trusted Location be secure? Or does this mean something else.
Thanks so much for you patience.
 
I would agree but it would appear that perhaps code is not running at all at the moment for the OP and therefore ANY solution isn't going to work until they get that resolved.

Don't know if this will give you any insight to this problem, but i have several basic macros running (OpenForm) that work fine. Does this indicate that the code is running???
 
Thanks guys/gals??
As I indicated this is a work computer as such wouldn't the Trusted Location be secure? Or does this mean something else.
Thanks so much for you patience.

You should assume NO until you can prove otherwise.
 
Does this indicate that the code is running???
No, it would not.

If you have not put this in a trusted location (as shown in the link I posted) - NOT referring to a Secure location - it is different. It has to be done on EACH COMPUTER that the database is going to be running on) or you haven't clicked that button that should appear if it isn't in a trusted location, then the code won't work. Some macros will work (ones not considered potentially dangerous).
 
As I said earlier I don't believe waiting for the error is the best approach to the problem.

Better to check for the duplicate before you attempt to add the record. This is very easily done with a DLookUp.
Thanks Galaxiom- This is exactly what i am trying to do here. I am trying to preempt the possibility on entering data by setting up the No Duplicates function. so that when I migrate my data across any future duplicates will be caught. I know this data current has no duplicates
Perhaps you can tell me how you envisage the DLookUp will work given the previous threads. I welcome all advice
 
I have never used macros only VBA.

This page appears to cover the use of a macro to check for duplicates using Dlookup.

http://support.microsoft.com/kb/209487

However it seems you have some other problems just getting code to run at all.
 
My Opinion.

First of all get Galaxiom's idea of checking for duplicates up and running. However to think big if there were dozens of users this may just fail depending on who did what and when. So you will also need the code that I supplied.

Second, make sure you have the trusted locations as per Bob's post.

Next do a test on my DB by, adding a duplicate value then move to the next Record. I think you may be trying to close the form. If you are then that would explain why you are getting both messages. If this is the case then you need to make sure the form cannot be close without running the following code.

Me.Dirty = False

Suggest you put this at the beginning of a Close Button. I would also suggest that you disable/hide the X in the top corner of the Form which will help to force users to use the Close Button.

Hope this helps.
 
No, it would not.

If you have not put this in a trusted location (as shown in the link I posted) - NOT referring to a Secure location - it is different. It has to be done on EACH COMPUTER that the database is going to be running on) or you haven't clicked that button that should appear if it isn't in a trusted location, then the code won't work. Some macros will work (ones not considered potentially dangerous).

The current Trusted Locations for this db sits on a shared server within the institute. I also have a personal folder on this drive that is password protected Should i put the db there and enable content? :confused:
 
partana

I would have thought that Bob would have followed up on this so as he hasn't I will.

The ONLY place as far as I am concerned to store a Front End is on the Client's Hard Drive. It should be a mde or equilivant format. Naturally this will need to go into a Trusted Location.

I don't understand the benefit of password protection that you mentioned. Why would you need one.?
 
partana

I would have thought that Bob would have followed up on this so as he hasn't I will.

The ONLY place as far as I am concerned to store a Front End is on the Client's Hard Drive. It should be a mde or equilivant format. Naturally this will need to go into a Trusted Location.

I don't understand the benefit of password protection that you mentioned. Why would you need one.?

Rainlover,
This is a large institution and personal folders are on a shared drive. I thought since i only have access to my folder (ie password protected) that this would be a secure (?Trusted Location). I am stumped!! I will talk to my IT guys on Monday and ask them if they know anything about setting up a Trusted Location. and the mde format. My problem is that but i am running one of the few PCs on campus with Access 2007! Thanks for not abandoning me :).
 
The Shared drive would be fine to use.

A Trusted Location has nothing to do with the usual meaning of the word Trust. Like I Trust my 3 month pld puppy not to did holes in the garden.

With Access 2007 and 2010 most Macros and some code is blocked. You can't use the Database without answering questions about allowing these actions.

Access 2007 and 2010 employ a method of always allowing the Database to run. This is done by placing the Database in a Folder that you have made into a Trusted Location.

Nothing to do with passwords etc.

You create a Trusted Location by following the instructions given to you by Bob Larson.

I think you can also make a Database Trusted by using a Signature or something. I don't use 2007 or 2010 enough to advise. It might be a good question for a new thread.

Suggest you goggle "Access Trusted Locations" for a better understanding.
 
I think you can also make a Database Trusted by using a Signature or something. I don't use 2007 or 2010 enough to advise. It might be a good question for a new thread.

Code in an mdb or mde file can have a digital signature added. This ability was removed for accd* files was removed in 2007 and only packages could be signed.

I understand the ability to sign a database was restored in 2010.

I have written about some of the lesser known aspects of using certificates on this page.

http://www.access-programmers.co.uk/forums/showthread.php?t=205900
 
Galaxiom,
Eureka! Changing the Trusted Location seems to work. At least now I can get Rainlovers error message to appear, but i am still haveing problem with the pop up message.This is what i am doing. I am going to a new record and putting in a value that i know is a duplicate. The error message pops up right away when i try to go to the next field. Perfect. Since i know this is a duplicate I delete that number then type in a new one. Enter and get a second error message again. I click okay and go to the next record without stopping me. If this was a real duplicate value, shouldn't I be stopped from going to the next record? I have placed the Event Procedure On Error, then changed it to On Dirty-same results. Ideas?
 

Users who are viewing this thread

Back
Top Bottom