Querying a table to return duplicate values

keels

Registered User.
Local time
Today, 22:23
Joined
Oct 7, 2011
Messages
19
Hi there, seriously I need help with a table and form. In short I want to know if I can modify a query to return all duplicates but only if it matches a combo box entry if so can I then have the query add the matching data to the same table?
I have a table of customer names and a macro to run a query to find duplicate names from my table after update. I just don't want to keep typing all the details when they are already there basically. So say Mike called and on my form I typed mike into the combo box instead of all the duplicates appear Can I modify it to show only customers called mike?

PHEW!

Oh btw I don't now anything about sql or vba and would be really appreciative of any help given.

Thanks in advance (Fingers crossed)
 
  1. Design a Datasheet Form using the Customers Table and save the Form with the name Customers_Sub.
  2. Create a Query for a Combobox source, using the Customers Table as given below:

    Code:
    SELECT Customers.[B]CustName[/B]
    FROM Customers
    GROUP BY Customers.CustName;
  3. Save the Query with the name cboCustomersQ.
  4. Open a new Form in Design View.
  5. If the Form doesn't have it's Header/Footer displayed then right-click on the Detail Section of the Form.
  6. Click on the Form Header/Footer option on the shortcut menu to display Form Header/Footer Sections.
  7. Create a Combo box on the Header of the Form using the cboCustomersQ and change the Name of the Combobox to cboCus.
  8. Now you must position the Main Form in such a way that you can click on the Customers_Sub Form, drag and drop the form on the detail section of the Form.
  9. While the Customers_Sub Form is still in selected state display it's Property Sheet (F4 or ALT+Enter).
  10. Change the Link Master Field Property value to cboCus.
  11. Change the Link Child Field Property value to CustName.
  12. Save the Main Form with the Customers_Sub form in it with the name frmCustomers.
  13. Open the frmCustomers in normal view.
  14. Select a name from the Combobox.
All the record(s) with the selected name will appear in the Customers_Sub Form. You may edit the records on the datasheet.

NB: Change the control names wherever applicable.
 
Thank you so much, will attempt in in a lil while when I get the nerve to try haha. It all seem so daunting just to go one step further than I already am.

Thanks again apr
 

Users who are viewing this thread

Back
Top Bottom