Rocky Smolin - Beach Access Software
bchacc at san.rr.com
Sun Apr 17 23:29:29 CDT 2005
Connie: Sounds like you've actually got it figured out. I'd use the After Update event of the sub-species combo box to see if they're trying to create a record that already exists. I'd open the recordset with the species/sub-species fields and use .FindFirst. Then use .NoMatch to see if it found a match. If .NoMatch is false that means it found a match so you want to display a message and then I think Me.Undo will get rid of the duplicate record, but that would have to be tested. You can also test for the duplicate with DCount but domain functions are pretty slow if the table is big or it's over a network. HTH, Rocky Smolin Beach Access Software http://www.e-z-mrp.com 858-259-4334 ----- Original Message ----- From: <connie.kamrowski at agric.nsw.gov.au> To: <accessd at databaseadvisors.com> Sent: Sunday, April 17, 2005 3:41 PM Subject: [AccessD] How to Question - check for duplicates in cascadingcomboboxes > > Sorry Guys > > Further clarification > > Yep its a no duplicates on the database record ie. they can have duplicate > of species but only with different subspecies. > > So if I have chosen a morelia spilota as the species and verigata as a sub > species I can chose morelia spilota again but only with a different sub > species say imbracata, or no sub species at all. > > So when the user chooses morelia spilota I firstly need to check if it is > already in the database as a species for this record, then if it is then > check if it contains a sub species. Then if the user chooses a sub species > I need to check if the sub species is the same as the one already chosen. > > Does that make it any clearer or have a confused it more? > > > Connie Kamrowski > > Analyst/Programmer > Information Technology > NSW Department of Primary Industries > Orange > > > > This message is intended for the addressee named and may contain > confidential information. If you are not the intended recipient or > received > it in error, please delete the message and notify sender. Views expressed > are those of the individual sender and are not necessarily the views of > their organisation. > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com >