Eliminate Duplicate Record In Combo Box.

Sep 15, 2006

Hi all,

This is an intersting question that my friend ask me... hope someone can help to solve it.

In a combo box i use to list out all the company in a table that with the duplicate of the company is allowed. Do someone have a good idea to filter the combo box when detect a duplicate data and just showing one of each company only? or can i create a query with just listing one of each company from the table with all those duplicate company data?

Thank you.

Regard,
alex

View Replies


ADVERTISEMENT

Eliminate Duplicate Records In A Query

Jun 5, 2007

I know there a many posts about eliminating duplicate records because I did search, but I did not see anything that really answers my question.

I have a query in a local Access database that is using a Linked table from an SQL database managed by our corporate IT department. I have read access to only certain tables / fields in the SQL database. My query is based on 3 tables from the database and I have them linked together in my query.

When managers move from one site to another, they are given a different TeamID number. However, until they are replaced, the manager will have more than one TeamID assigned to him in the SQL database. Evidentally, the way our IT has the SQL database structured, when I query open items it duplicates the record for that manager because he has 2 TeamID numbers. So the only field that comes up differnt in the duplicate records is the manager's TeamID number.

I would like for my Select Query to ignore the duplicate record. I know I can use an Append Query to copy the data temporarily to a local table and set the proper fields as Primary Keys to do this. However, it would be nice if I did not have to go to all that trouble.

Is there a way to eliminate duplicate in my Select Query?

As always, I appreciate the help.

Jim

View 2 Replies View Related

Filter/ Sort Query To Eliminate Duplicate Fields

Apr 6, 2006

Basically i have a mortgage application system which im running a query on to see which applications have been completed in the last week or period up to now ie. last week, last month, last 3 months.

basically each application or CaseID has one or more applicants. The majority of them have two applicants. A few have one.

Problem is when i run this query which shows me: - CaseID, CLIENTNAME, LENDER, PRODUCT, MORTGAGE RATE, LOAN AMOUNT -

it brings up these fields but i only want one occurence of each CaseID????

CaseID Forenames Surnames PRODUCT RATEDateCompletedLoan required
2821NothandoDube71116.6920/01/2004£63k
2821Sipho Dube 711 16.69 20/01/2004 £63k
2909Hobbly Chise 726 15.69 31/01/2002 £164k

Get the picture? Both Sipho and Nothando are applicants on the same mortgage but i only want to show one name. Anybody know how to help me out???

Ive taken up this existing system, so i think there's possibly a normalisation problem thats causing this. But i need a quick fix for now rather than redesign the whole system.

View 2 Replies View Related

Forms :: Error On 2nd Combo When Adding A Duplicate Record?

Jun 7, 2015

error message I am getting when I click on my Duplicate Record button (created through the wizard).

I have two combo boxes on the main form that populates data when the user makes a selection from the combo box. First combo box populates project data and the second combo box populates equipment data. The form is working well with the two combo boxes populating the data into the main table.

Now I would like to add a duplicate record button to copy a record and paste the data as a new record. So, I added a duplicate record button using the wizard and I am receiving the following AfterUpdate error.

Run-time error 3020: Update or CancelUpdate without AddNew or Edit.

This is the code I am using to copy and paste a duplicate record:

Private Sub InputForm_DupRec_Button_Click()
On Error GoTo Err_InputForm_DupRec_Click
DoCmd.RunCommand acCmdSelectRecord
DoCmd.RunCommand acCmdSaveRecord
DoCmd.RunCommand acCmdCopy
DoCmd.RunCommand acCmdPasteAppend
Exit_InputForm_DupRec_Click:
Exit Sub
Err_InputForm_DupRec_Click:
MsgBox Err.Description
Resume Exit_InputForm_DupRec_Click

It seems to be duplicating the data from the first combo box, but not the second one where it errors out.

View 1 Replies View Related

Queries :: Eliminate A Record Not In Date Range

Jan 8, 2015

I have a query as follows :

SELECT tblCase.CaseId, tblCase.ReqReceived, tblCase.Letter_AMPI
FROM tblCase
WHERE (((tblCase.Letter_AMPI) Between #4/1/2014# And #3/31/2015#)) OR (((tblCase.ReqReceived) Between #4/1/2014# And #3/31/2015#))
ORDER BY tblCase.CaseId;

I am looking for all records where either the field Letter_AMPI or the field ReqReceived falls between the specified date range, EXCEPT as below.

However there are cases where first there is a date for Letter_AMPI and then a few weeks letter, we get a special request for the same case which is the ReqReceived date. So for example we may get a case which has an Letter_AMPI date of 01/01/2014 (not in the date range), but a ReqReceived date of 05/10/2014 (in the date range). So I need to be able to eliminate this record because if the Letter_AMPI does not fall in the date range, it should not appear in the results.

I know that it does not work because of the OR but I need the OR to pick up the other records.

View 13 Replies View Related

Forms :: Create A Filter To Eliminate Any Record From Form Where Nothing To Show In Subform

Jun 7, 2013

I've got a hopefully an easy question - how to create a form filter? I've got a form with a subform. Form is showing all records from a table, but some records on the subform are blank. I want to create a filter which will eliminate any record from the form where there is nothing to show in the subform.

View 8 Replies View Related

No Duplicate In Combo

Oct 9, 2005

Hi,

I have a table containing 100s of records. One of its field is Entry_Date. There may be more than one record entered in same date.

Example:
Entry_Date Item
24/09/2005 abc
24/09/2005 pqr
25/09/2005 xyz
24/09/2005 lmn

and so on..

I created a combo on a form based on a query to get all the data from the above table. When I click the combo it shows me all the records. But I need my combo not to show duplicate records.

Example : The combo box should show the records as follows:

24/09/2005
25/09/2005

I do not need other fields in the combo except date field. I have some further actions to take based upon the date I selected in the combo. I dont find 'Hide duplicate' option in its property.

How could I do that?

With kind regards,
Ashfaque

View 2 Replies View Related

Duplicate Values In Combo Box

Jul 31, 2006

hi again,

I'm building a search function into my database and everything's fine apart from the fact that i have duplicate values in my combo boxes.

For example in the combo box 'market' i have many fields named Europe.

How do i replace these repeated values with one distinct value?

Cheers

View 1 Replies View Related

Get Rid Of Duplicate Entries In A Combo Box?

Sep 10, 2004

hey,

sorry to bother everyone again, this is such a great forum, and ive gotten soo much help here.

i have a customer table, containing custRef, custName, drawerRef, Address, Phone, Fax

now it contains site addresses so the custName can be the same for quite a number of entries. no the combo box in my form obviously shows all entries for custName which means the same name repeated sometimes 6 or 7 times, as i only need to select one, is there a way without looking to different tables etc to just show unique entries. i dont want to list them all in another table because i dont know them all yet, so i want it to lookup the list as i enter them.

cheers

Baz

View 3 Replies View Related

Combo Boxes And Duplicate Entries

Aug 17, 2005

Hello

I am trying to get a 2nd combo working from the first .

I have a table called Keystage (tblKeystage) and I have also named my 1st combo cboKeystage. then by following the vba below I created another 6 tables with corresponding names and combo's.

Private Sub cboKeystage_AfterUpdate()

On Error Resume Next

Select Case cboKeystage.Value
Case "Foundation"
cboYear.RowSource = "tblFoundation"
Case "KS1"
cboYear.RowSource = "tblKSOne"
Case "KS2"
cboYear.RowSource = "tblKSTwo"
Case "KS3"
cboYear.RowSource = "tblKSThree"
Case "KS4"
cboYear.RowSource = "tblKSFour"
Case "Post16"
cboYear.RowSource = "tblPost"

End Select

End Sub

The combo boxes both work, brilliant. My problem is that when I enter another record and make a selection from the 1st combo box, it changes all the records.

Could somebody please help.
Thanks
Wong

View 3 Replies View Related

Forms :: Duplicate Records In Combo Box

Mar 10, 2015

I have an issue with duplicate records showing in a combo box. I have checked "Yes" for unique values and they still show. I only have one field showing in the drop down and don't care about the other fields for that specific selection.

How to remove these duplicates from showing?

View 14 Replies View Related

General :: Duplicate Entries In Combo Box

Apr 21, 2013

I've got a combo box that lists duplicates. I want the dupes removed.

I went to the Query Builder for my Combo Box and set Unique Values from "No" to "Yes" - Saved, then re-opened the form. It still lists dupes.

I went back into Query Builder and unchecked the box for the Patient_ID (Autonumber) field. I saved it, then viewed the Datasheet for the Query, and it correctly lists the data I want WITHOUT dupes.

However, when I go to Form View, the combo box lists several blank entries..

The entries come back when I re-enable the Autonumber field in the Query.

This is what I currently have...

SELECT DISTINCT Patients.FullName FROM Patients ORDER BY Patients.FullName;

View 4 Replies View Related

Preventing Duplicate Selection Of Combo Box Values

May 5, 2014

I am working on a database to track IT assets with third parties. I have a table called "Equipment" that includes info like model, serial numbers, purchase price, date, location, and "Asset ID". I have a second, single field table called "asset tag" that is just a list of asset ID tags, XYZ1000, XYZ1001, XYZ1002..

I created a one to one relationship between the two tables on the following fields: "equipment.assetID" and "asset tag.asset ID"

Once an "asset ID" is used, I would like it to either be grayed out or disappear from the list of available ID tags. Basically, I want it so that each "asset tag. Asset ID" can only be used once.

View 3 Replies View Related

Combo Box With Multiple (possibly Duplicate) Payment Methods

May 1, 2006

Hello everyone. I'm a little new to the Access scene. I have a strong background in C, C++, Java, and assembly. Seems all the access books out there fail to mention the need to know vbs, heh.

Anyhow, I have a form ([WrkR]) based on a table ([ORDERS]) that has a customer's name ([Tables]![ORDERS]![name]), total payments to visa ([Tables]![ORDERS]![visa]), and total payments to cash ([Tables]![ORDERS]![cash]), and total payments to debit ([Tables]![ORDERS]![debit]). My form also has three rows, each containing a text box which holds how much a person has paid, and a combo box ([combo1], [combo2], [combo3]), that allows the user to choose what payment type was used. I have included a screen cap to demonstrate this.

I need to be able to create a function or macro, anything that will sum up the appropriate totals and store them in the corresponding columns in my table. Like in my example, there are 2 visa costs and a single cash cost that should be added up and stored in my table in the appropriate fields.

View 6 Replies View Related

General :: Cascade Combo Boxes With Duplicate Values

Jan 18, 2013

I'm trying to Identify a particular entry in my table for editing via combo boxes. The same serial number will come in multiple times but a different job number each time it comes in. To identify a record for editing I need the user to identify the serial number in combo1 and then the job # in combo2 (cascaded combo boxes).

The issue I'm running into is that combo1 has dozens of serial number duplicates (combo2 is acting as it should). When I change some settings around I'm able to get combo1 to eliminate duplicates but now combo2 only shows 1 job # when there should be dozens for that serial #. I need all like serial numbers to show their job # in combo2 and I have not had any luck surfing around the net/forums/experimenting.

I'm pretty sure I have to use a Junction Table but I haven't messed with that and I'm not 100% sure that's the best/only way to do it.

View 8 Replies View Related

Duplicate A Record

Apr 12, 2005

I have a database with a table that uses a numeric field as a PK. If I use the built in "Duplicate" Command button on a form it creates an exact duplicate of the record, which then Access won't allow because the PK is no longer unique.

Does anyone know of a way that I could make the number be the max number + 1 when I click the "Duplicate" Button?

Thanks

View 1 Replies View Related

How T Prevent Duplicate Record Set

Mar 11, 2006

Hi All,

I have a recored set and i dont want a duplicate of the record set in the same table.

Say if my table name is businessskills and contains three fields(columns) and their names(Email , B_code, Rating) highlighted in red with data are as below

Email B_code Rating
hugh@hp.com b001 1
hugh@hp.com b002 3
hugh@hp.com b005 2
ston@hp.com b002 3
ston@hp.com b007 3

I have 5 recordsets in my table as shown above and i want to prevent any e duplicates.

Is this possible to implement to with excel vba code or directly in Access Database, either ways is fine with me.

Can any one please help me with this.

Thanks in advance

View 1 Replies View Related

Duplicate Record Error

Dec 21, 2006

I'm trying to make a simple DB that we can enter our time for working on projects.

So far I have a Form with the employees name and the date in it. Then below that is a subform with the project number, name, client name, and hours.

I want to use this whole "sheet" for one days worth of work for 1 employee. New sheets will be used for each day.

When I try to make a new sheet I get an error that it cant change the table because it would be creating a duplicate entry.

How do I solve this?

Also, should it be difficult to be doing what I'm trying to do?

View 2 Replies View Related

Duplicate Record Problem

Jul 13, 2007

The access table has one primary key StudentID which is indexed with no duplicates. (StudentID consists of schoool ID + an auto increment #)

When a second student is entered with the same name and birthdate into the table but with a different studentid the record cannot be saved as there is a duplicate value. If the birthdate is removed the record can be saved. If another character is entered after the first name with the birthdate the record can be saved.

I have tried adding time to the record, that did not solve it. I tried changing name and birthdate to index yes duplicates okay that did not solve it.

The only relationship is on studentid, I cannot understand why the birthdate is the problem when there is no relationship or primary key on that value.

Has anyone experienced this issue and can explain why access views this as a duplicate record when in fact it is not!

Thanks

View 5 Replies View Related

Duplicate Record Error

Aug 17, 2005

hi everyone,

i have a form that i'm trying to create a button to duplicate the record. i'm using the control wizard which produces the following code:

Private Sub DuplicateRecord_Click()
On Error GoTo Err_DuplicateRecord_Click


DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 2, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 5, , acMenuVer70

Exit_DuplicateRecord_Click:
Exit Sub

Err_DuplicateRecord_Click:
MsgBox Err.Description
Resume Exit_DuplicateRecord_Click

End Sub

When i try to execute the code via a comand button, i get an error and the duplicate record operation does not occur. one thing i noticed is that i have a lot of lookup fields (i.e. FK's to lookup tables one-to-many relationships) in underlying table being populated by the form. i've created combo boxes on the form to populate the FK's in the underlying table. the error that occurs when trying to use the above code produces a "paste errors" table and in that paste errors table instead of the bound column values from the combo boxes (i.e. PK values from the lookup tables) it shows the display values from the combo boxes. i'm not sure if this has do with anything, but i couldn't figure out why it was doing this.

does anyone have any ideas how i could get this duplicate record procedure to work?

many thanks for any help or suggestions.

View 1 Replies View Related

Duplicate Whole Record (in Form)

Dec 2, 2005

I have a form (with subform in it) and i fill it with different values. After some time, i need to fill another record (new one), with similar values.Is it possible to make a duplicate of my previous record, and put it in the "new record" so that i won't have to fill all fields again, only change excisting ones to different values.

Thanks

View 11 Replies View Related

Forms :: Go To Record If Duplicate?

Mar 13, 2014

On my form I've got an afterupdate event that checks if the information entered already exists and this works absolutely fine. However what I would like is the option to go to the existing record if one is found, but I can't get it to work.

This is my code currently;

Code:
Private Sub Job_No_AfterUpdate()
If DCount("*", "PACKING", "[Job No>]='" & Me.[Job No] & "'") > 0 Then
If MsgBox("Job Number already exists! Go to record?", vbYesNo, "DST PLANNER") = vbYes Then
Dim rs As Object

[Code].....

The check for the Job Number works fine but when I click Yes on the message box, the form stays on the current record instead of moving to the existing record.

View 14 Replies View Related

Duplicate A Record On A Form?

Mar 17, 2013

I am having trouble duplicating a record on a form. It gets tripped up on the phone number field ?????

The phone field has an telephone input mask. The error message is:

"The value you entered isn't appropriate for the input mask '99/99/0000;0_' specified for this field"

View 3 Replies View Related

Getting Duplicate Records In Split Form Datasheet When Using Combo Box With Multiple Selections

Jan 30, 2015

How to correct the issue below. I created a split form and I have 2 combo boxes that allow multiple selections. The one combo box for LOB (line of business) works perfect and does not create duplicate records in the datasheet view of the split form. The 2nd combo box with multiple selections creates duplicate records in the datasheet depending on how many selections are made.

I have checked this in the underlying table and there are no duplicate records, it is only in the split form datasheet. I have checked settings and configuration between the 2 combo boxes that are reacting differently and they appear to be identical...

View 7 Replies View Related

Check For Duplicate Record By 2 Fields

Mar 12, 2007

dear all

i managed to get checking for duplicate record by ONE field ie member_no

code :

If DCount("*", "runner", "member_no = " & Me.member_no) > 1 Then
MsgBox " This member is already exist!" & vbCrLf
Me.c_memberid.SetFocus
Else
DoCmd.CancelEvent
End If


how i want to get checking duplicate record by TWO fields ie member_no and run_no ?


thanks in advance

View 1 Replies View Related

One Annoying Duplicate Record Problem!!!

Aug 4, 2005

I have a search form passing text from unbound controls to a query. These two fields (AuthorName & Title) of the query are from two different tables (Authors & Papers) set up in a many to many join. The 3 dummy records I am using are as follows:

Record 1
AuthorName: Smith (Author 1)
Title: SmithTitle

Record 2
AuthorName: Smith (Author 1)
AuthorName: Jones (Author 2)
Title:SmithJonesTitle
(i.e. two authors for this record)

Record 3
Author: Jones (Author 2)
Title: JonesTitle

If I stick in 'Jones' into the Author field and 'JonesTitle' in the Title field I correctly get 1 result from the query (record 3). However, oddly, if I put in Smith and SmithTitle I get two records (2 x record 1)!!!!! There aren't two records!!! Similarly if I leave both blank I get all the records and again there is a duplicate of the Smith record (and only this one is duplicated!)

The query criteria are:

[AuthorName] Like [Forms].[Search]![Author] & "*"
[Title] Like [Forms].[Search]![Title] & "*"

Any ideas???

Thanks

View 5 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved