Page 1 of 2 12 LastLast
Results 1 to 15 of 16
  1. #1
    vugar is offline Advanced Beginner
    Windows 7 64bit Access 2013
    Join Date
    Apr 2014
    Posts
    53

    Primary key


    could you please help?
    can I create primary key with macros avtomaticaly.
    I have created table with Query and I need primary key in this table. I put new field for primary key but after restarting it was delete every time.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    Why are you creating table with query?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    vugar is offline Advanced Beginner
    Windows 7 64bit Access 2013
    Join Date
    Apr 2014
    Posts
    53
    I must get sum information from another table.

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    That's what queries are for. Why is there a need to make a table?

    Look at the last example in https://msdn.microsoft.com/en-us/lib...or=-2147217396
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    vugar is offline Advanced Beginner
    Windows 7 64bit Access 2013
    Join Date
    Apr 2014
    Posts
    53
    I must create table from query so I can use it in another query to input data.

    Could you please tell can I write SQL for greate field (primary key) for appent query?

  6. #6
    Join Date
    Jun 2015
    Location
    Wales. Land of the sheep.
    Posts
    1,228
    Just have an auto number field that generates a sequential number. Although as June said, this doesn't seem like the best idea. You will have several copies of the same data, which defeats the object of a database.

  7. #7
    vugar is offline Advanced Beginner
    Windows 7 64bit Access 2013
    Join Date
    Apr 2014
    Posts
    53
    I'm trying to create warehouse DB, and in outgoing table I try select items from incoming table. in incoming table may be many recors so I create Query with grouping items and I can create relation without primary key.

  8. #8
    vugar is offline Advanced Beginner
    Windows 7 64bit Access 2013
    Join Date
    Apr 2014
    Posts
    53
    How I can use it's query for using for input in another table?

  9. #9
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    Still don't understand why you need to make table. A query can be used in another query.

    Can't create primary key with an append query.

    Seems there is a language barrier but you really need to provide complete info on what you are really trying to accomplish so we can advise on best approach to get it done. So far, little of what you have provided makes any sense.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  10. #10
    vugar is offline Advanced Beginner
    Windows 7 64bit Access 2013
    Join Date
    Apr 2014
    Posts
    53

    Wdb

    WDB.zip

    please see attached file.

    I'm trying to select items from "catalog for outgoing query" in "Outgoing".

    Could you please tell how can I do it?

  11. #11
    vugar is offline Advanced Beginner
    Windows 7 64bit Access 2013
    Join Date
    Apr 2014
    Posts
    53
    One question more.

    how to make so that if I remove primary keys from table in another table where I added data with this table, do not delete records. ?

  12. #12
    Join Date
    Jun 2015
    Location
    Wales. Land of the sheep.
    Posts
    1,228
    Why would you need to remove keys?

  13. #13
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726
    vugar,

    Could you please give readers an overview of what your business is? You are asking questions without any business context, so readers may only guess at what you are trying to do.
    You really haven't addressed June's question
    why you need to make table.
    Your database is a representation of How you have done something. Readers don't know what the business and business facts are, so can not relate your database to a set of requirements.
    You will get more focused answers if you provide some context, background and details with your questions.

  14. #14
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    I looked at your db and that did not help me understand what you are trying to accomplish.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  15. #15
    vugar is offline Advanced Beginner
    Windows 7 64bit Access 2013
    Join Date
    Apr 2014
    Posts
    53
    I'm trying to construct Warehouse DB.

Page 1 of 2 12 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Help with primary key
    By JimmyRN in forum Database Design
    Replies: 10
    Last Post: 07-31-2017, 09:42 AM
  2. What is best for Primary key
    By tagteam in forum Access
    Replies: 3
    Last Post: 03-20-2013, 06:00 PM
  3. Primary Key
    By DukeBlue in forum Access
    Replies: 18
    Last Post: 09-23-2011, 05:23 PM
  4. Primary Key Help
    By phoenix13 in forum Access
    Replies: 4
    Last Post: 07-30-2009, 12:36 PM
  5. about the primary key!
    By Yuesko in forum Access
    Replies: 1
    Last Post: 05-29-2009, 04:20 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums