473,396 Members | 1,961 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

duplicates

lee123
556 512MB
hi there i have a question, how can i find duplicates of items used by other customers...well to make this make sense i have a form i created to hold a lot of mats that goes out on a route. some of the same mats goes out with different drivers. well that being said, my question is if i wanted to find these mats and there different rt.drivers how would i make a query for this? on my form i have made a search to find mats im looking for and it pulls it up but in my search i want to make it if its a mat that different drivers use it will pull it up in a subform i will create. the code for the search is this.


Expand|Select|Wrap|Line Numbers
  1. Private Sub Text63_AfterUpdate()
  2.  
  3.      Dim mydata As String
  4.  
  5.      mydata = Text63  
  6.      If mydata = "" Or IsNull(mydata) Then Exit Sub
  7.      DoCmd.GoToControl "customername"  
  8.      DoCmd.FindRecord mydata, acAnywhere, False, acSearchAll, , acCurrent, True
  9. End Sub
can anyone modify this so when i search for these mats it will pull all the mats that are duplicates in the subform and the mats that are not in the database to pop up a msgbox that say's "there is no mats of that kind"


thanks,
lee123
Oct 21 '07 #1
3 997
nico5038
3,080 Expert 2GB
When you want to have insight of the mats for different drivers, you can create a GroupBy query to count the number of mats and add the number of drivers.
Those having > 1 driver are the ones you're interested in.
Guess just a subform with Mat and #drivers will solve the problem of your user.

What additional requirements do you have? It looks to me that only mats delivered on the same day are of interest, thus the GroupBy would also need to group on the deliverydate...

Nic;o)
Oct 22 '07 #2
lee123
556 512MB
thanks nico5038, for responding yea just the duplicates mats. question, in the criteria is where i put ( >1) and how do i adjust the code to only find those mats i seek for instant if i wanted to find a mat called (tammies) and three different drivers use this mat. how would i have the search find this mat and all of its id's
and then there is the msgbox to say if a mat don't exist or if they misspelled the mat.

lee123
Oct 22 '07 #3
nico5038
3,080 Expert 2GB
You need to open the graphical query editor and place the table with the tams and drivers.
Now press the "E" looking button and place Tam and Driver and the table unique ID (or another always filled field).
Under all fields you'll see "GroupBy" appear.
Change this under the ID into "Count".
Save this and see the effect.
Now remove the Driver field and test again.

These two tests will show the data needed. Under the ID you can place the >1 criteria.

Got it ?

Nic;o)
Oct 22 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

8
by: Michelle | last post by:
hi, i have created an array from recordset containing user names eg. (davidp, davidp, evenf, patricka, rebeccah) which i have sorted in alphabetical order, but i need to identify duplicates...
6
by: Marlene | last post by:
Hi All I have the following scenario, where I have found all the duplicates in a table, based on an order number and a part number (item).I might have something like this: Order PODate Rec...
16
by: tyrfboard | last post by:
I've been searching for awhile now on how to remove duplicates from a table within an Access db and have found plenty of articles on finding or deleting duplicates. All I want to do is remove them...
3
by: AK | last post by:
Hi Our product uses MS-SQL Server 2000. One of our customer has 10 installations with each installation stroring data in its own database. Now the customer wants to consolidate these databases...
7
by: vsgdp | last post by:
I have a container of pointers. It is possible for two pointers to point to the same element. I want to remove duplicates. I am open to which container is best for this. I thought of using...
14
by: ak | last post by:
Is it possible to find repeated(duplicate) element in an array in single loop ? AK
3
by: ryan.paquette | last post by:
In the table there are 2 fields in which I wish to limit (i.e. No Duplicates) Although I do not want to limit them to "No Duplicates" separately. I need them to be limited to "No Duplicates" as...
7
by: john.cole | last post by:
I have searched all the groups I can, and I still haven't been able to come up the solution I need. I have the following problem. In my form named sbfrmSpoolList, I am entering a job, spool and...
1
by: tskmjk55 | last post by:
Recently, I have a requirement to develop a vb.net application wherein the input excel sheet data which has an average of 5000 records should be checked for Internal duplicates (duplicates within the...
3
Thekid
by: Thekid | last post by:
I'm trying to figure out a way to find if there are duplicates in an array. My idea was to take the array as 'a' and make a second array as 'b' and remove the duplicates from 'b' using 'set' and then...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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,...

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.