[mso] Re: Access 2k :VSMail mx3

  • From: James LaBorde <jlaborde@xxxxxxxxx>
  • To: "'mso@xxxxxxxxxxxxx'" <mso@xxxxxxxxxxxxx>
  • Date: Fri, 29 Aug 2003 08:24:18 -0700

Pam,

Primary key cannot be blank.  However, if you  have a multiple field primary
key, that is only true of the entire Primary Key.  This means one or the
other field can be blank, provided the other is not and the combination
remains unique.

An append Query will take all of your data from one table and add it to a
second table.  It will not tell you specifically which fields were not
added.  There is a way around that though.  Follow this process.

1. Right Click and copy your table
2. Right Click and paste the table, rename it and check the selection for
Structure Only
3. If you do not already have an autonumber field, add one to your original
table and add an additional field to your new table as a Number - Long
Integer data type
3b. If you have an autonumber field in your original table, change it to a
number - Long Integer field on the new table
4. Run your append query and click olay when it tells you fields will not be
added.
5. Open a new query and bring in both your original table and the new one.
6. Link the fields on your autonumber/Number - Long Integer field.  
7. Double click the link between the tables.  This should bring up a dialog
box that allows you to change the link type.  By default it will be set to
include fields that are the same in both tables. Select the option that
includes all your records from your original table and only matching records
from your new table.
8.  Bring in all the pertinent fields from your original table and the
Number field from the new table.  Uncheck the box to display the Number
field and in the criteria location for this field type, Is Null.
9. Execute the query.
10. Your results will be all of the records in your original table that are
not in your new table as their primary key fields are duplicated within the
table.

I hope this helps you get where you need to be.  If you need any more help,
please just let me know.  If this is still confusing, watch for the next
issue of Linda's Newsletter.  This is a great topic for an article.  I will
include step by step directions complete with images.

James

-----Original Message-----
From: Pam [mailto:ltf01@xxxxxxxxxx]
Sent: Thursday, August 28, 2003 1:35 PM
To: mso@xxxxxxxxxxxxx
Subject: [mso] Re: Access 2k :VSMail mx3


Hi James,
Thanks for the quick answer.  The fields are already named as you specified.
I just used # out of habit.  I always thought a primary key field couldn't
be blank.

Can you elaborate a little more on the append query?  I've done it a couple
of times but that was over a year ago and I'm fuzzy.
Will executing it tell me which records won't be added?  Reason is because
they all need to be there, we just need to reassign cat and/or item #'s to
the duplicates.

Thanks,
Pam

-----Original Message-----
From: mso-bounce@xxxxxxxxxxxxx [mailto:mso-bounce@xxxxxxxxxxxxx]On
Behalf Of James LaBorde
Sent: Thursday, August 28, 2003 3:04 PM
To: 'mso@xxxxxxxxxxxxx'
Subject: [mso] Re: Access 2k :VSMail mx3


Pam,

You can create a dual primary field.  Just create a new table for now to do
this.  Create the table, using CatNum, and ItemNum rather than the pound
sign.  (The pound sign can cause other problems down the road.)  In the
design view highlight both these fields and click on the Primary Key icon.
You will have a dual primary key enabled.  Under CatNum, change the Required
field to Yes.

With this configuration, you will be allowed to have any number of the same
category you want and any number of the same item you want, as long as both
are not exact duplicates of another set.

In order to check for existing duplicates, do an Append query from your
existing table to your new table.  When you execute it, you will get an
error message telling you that ## of records won't be added due to key
violations.  Click Ok to this.  You will now have a new table with no
duplicate entries.

If you need any help with this just holler.

James La Borde
South Western Federal Credit Union


-----Original Message-----
From: Pam [mailto:ltf01@xxxxxxxxxx]
Sent: Thursday, August 28, 2003 12:56 PM
To: MicrosoftOffice
Subject: [mso] Access 2k :VSMail mx3


Hi all,
I need to create a check point of some sort that consists of 2 fields, a
cat# and item#.  There will often be the same cat# or the same item# but
there should never be a duplicate of the combination of both fields.  Also,
there may not always be an Item# but will always be a Cat#.

Example:

Cat#    Item#
101    R2
101    R3
105    R2
105    R3
105    R6
170
190


Since this table is already populated with over 7000 entries I need to check
for any already existing duplicates too.  Is there a way to do this?

Pam

*************************************************************
You are receiving this mail because you subscribed to mso@xxxxxxxxxxxxx or
MicrosoftOffice@xxxxxxxxxxxxxxxx

To send mail to the group, simply address it to mso@xxxxxxxxxxxxx

To Unsubscribe from this group, send an email to 
mso-request@xxxxxxxxxxxxx with the word "unsubscribe" (without the quotes)
in the subject line.

Or, visit the group's homepage and use the dropdown menu.  This will also
allow you to change your email settings to digest or vacation (no mail).
//www.freelists.org/webpage/mso

To be able to use the files section for sharing files with the group, send a
request to mso-moderators@xxxxxxxxxxxxx and you will be sent an invitation
with instructions.  Once you are a member of the files group, you can go
here to upload/download files:
http://www.smartgroups.com/vault/msofiles
*************************************************************
*************************************************************
You are receiving this mail because you subscribed to mso@xxxxxxxxxxxxx or 
MicrosoftOffice@xxxxxxxxxxxxxxxx

To send mail to the group, simply address it to mso@xxxxxxxxxxxxx

To Unsubscribe from this group, send an email to 
mso-request@xxxxxxxxxxxxx with the word "unsubscribe" (without the quotes) in 
the subject line.

Or, visit the group's homepage and use the dropdown menu.  This will also allow 
you to change your email settings to digest or vacation (no mail).
//www.freelists.org/webpage/mso

To be able to use the files section for sharing files with the group, send a 
request to mso-moderators@xxxxxxxxxxxxx and you will be sent an invitation with 
instructions.  Once you are a member of the files group, you can go here to 
upload/download files:
http://www.smartgroups.com/vault/msofiles
*************************************************************

Other related posts: