Wrox Programmer Forums
|
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 17th, 2005, 12:33 PM
Registered User
 
Join Date: May 2005
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Access 2003

I need to assign a number count to duplicate records. For instance, if a Catalog Number is equal to another Catalog Number, I need to assign them the same number.

So,
Catalog Number: Number:
12345 1
12345 1
22222 2
22222 2
33333 3
33333 3
44444 0
55555 4
55555 4

I thought that I could use a simple iif statement but don't know how to get it to assign the count of records that are duplicates.

Any suggestions?

Thanks!
 
Old May 17th, 2005, 12:42 PM
Friend of Wrox
 
Join Date: Oct 2004
Posts: 564
Thanks: 0
Thanked 4 Times in 4 Posts
Default

Before we look at figuring this one out, is there a reason to have duplicate catalog numbers?

If not, it may be worth pulling a list of distinct catalog numbers and then using an autonumber field to assign each a unigue number.

Let us know,

Mike

Mike
EchoVue.com
 
Old May 17th, 2005, 01:06 PM
Registered User
 
Join Date: May 2005
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Yes, unfortunatly there are duplicate catalog numbers that I must review and suggest witch one is to be deleted. They want to be able to group them with the duplicate value underneath according to date.

so:
1 12345 4/2/2005
1 12345 3/1/2003

2 22222 3/1/2003
2 22222 3/1/2002
 
Old May 17th, 2005, 02:30 PM
Friend of Wrox
 
Join Date: Oct 2004
Posts: 564
Thanks: 0
Thanked 4 Times in 4 Posts
Default

I would have to rack my brain to remember how to do that, but for now, you could do a simple query, and sort by catalog number and then by date. That will order give you the order that you want. Let me know if you need more than that, and I will see what I can figure out tomorrow.

Hope that helps

Mike

Mike
EchoVue.com
 
Old May 17th, 2005, 03:37 PM
Registered User
 
Join Date: May 2005
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Yes, that is what I ended up doing to show them what they wanted. Will need to do the above at some point, but for now, they are ok!
Thanks for your help!

Kim





Similar Threads
Thread Thread Starter Forum Replies Last Post
Access 2003 Problem allenle37 BOOK: Access 2003 VBA Programmer's Reference 2 May 7th, 2007 11:55 PM
Access 2003 Documenter strike33 Access 1 August 23rd, 2006 06:22 AM
Upgrading from Access 2002 to Access 2003 lryckman Access 1 July 16th, 2006 01:46 AM
Access 2003 Runtime Clarence Morgan Access 1 December 3rd, 2004 01:23 AM
Access 2003 Security simmy Access 2 February 4th, 2004 06:24 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.