Check for duplicates in real time (1 Viewer)

Lonemascot

Registered User.
Local time
Today, 04:03
Joined
Apr 2, 2013
Messages
14
Hi guys. not quite sure what this is called so didnt have much luck when searching.

I have a form which im using to store records about companies that I have mailings with. The company name is my unique field as no two companies should have the same name. This form is accessed by several different people and data is input so I dont want duplicates of the company name being produced. Currently, the form wont save a record if it is duplicated but by then I would have filled out the entire form and wased my time. Is there a way to do the following:

As I enter the company name it would look up exisitng company names. eg if i wanted to enter a new company called 'Dans Plumbing', I would type 'D' and below the text box would display a load of existing records starting with D. after that when I type 'Da' it would only display records starting with Da and so on. All being well, when I have finished typing the company name there should be nothing underneath so that I instantly know its not a duplicate and vice versa.

The possible duplicate doenst have to be underneath it could auto complete IN the text box a bit like the address bar on a web browser.

Any help much appreciated

Thanks
 

bob fitz

AWF VIP
Local time
Today, 12:03
Joined
May 23, 2011
Messages
4,726
Sounds like you need to use a combo box control.
 

Lonemascot

Registered User.
Local time
Today, 04:03
Joined
Apr 2, 2013
Messages
14
Hi thanks for the reply. My knowledge of access is pretty basic but I can work it with a bit of guidance. What would I need to do with this combo box control?
 

bob fitz

AWF VIP
Local time
Today, 12:03
Joined
May 23, 2011
Messages
4,726
Just use the wizzard to create a combo box. Its data would come from the table that holds the company names. You will need some code in the "NotInList" event of the combo box to hadle the addition of new names, but there must loads of posts on this. Post back if you have problems.
 

Users who are viewing this thread

Top Bottom