Results 1 to 5 of 5
  1. #1
    Join Date
    Oct 2002
    Posts
    16

    Unanswered: Creating records from another table

    Can anyone help with this?

    I have a table, say called Colours, which contains some fixed records. Primary Key being Colour Name (Red, Yellow, Green, etc...) with various related fields (maybe Hue, Brightness, Contrast, etc...)

    I have another table setup, say called Universe, which contains a field called Planets (Saturn, Pluto, Neptune) and various related fields (maybe size, density, distance, etc...)

    I have another table setup, say called Results, which contains a compound key (of two keys). One links to the field Colour Name (in table Colours) and the other linking to the field Planets (in table Universe) with other various fields. I want to create a record for each colour in this new table against each Project Name ie.

    Planets Colour Name Field 2 Field 3

    Saturn Red XXX XXX
    Saturn Yellow XXX XXX
    Saturn Green XXX XXX
    Pluto Red XXX XXX
    Pluto Yellow XXX XXX
    Pluto Green XXX XXX

    etc...

    The current way I have been doing it is to simply create new records manually, which for the data I am really using is a nightmare because the "Colours" table contains 96 records so for every record in the "Universe" table requires 96 records against them in the table Results.

    Is there a way to get this process automated so that whenever anyone enters a new Planet record then new records (96 of them) are created in the Results table? Or maybe a button can be pressed to automate this creation?

    I am sorry if I have not explained this very well!!!

    Thanks in advance,

    Daz

  2. #2
    Join Date
    Aug 2002
    Location
    Singapore
    Posts
    91
    You can use append query, and call the query from vb code. Alternatively, you can run SQL from vb code, adding 96 records, either using DoCmd, or Recordset.

  3. #3
    Join Date
    Oct 2002
    Posts
    16
    Thanks for the reply but I have to admit to being thick over this issue!!!

    I can just about put together a simply database with basic macros. As for anything else I am lost.

    Is there any chance you could make this any clearer for a newbie like me??

    Thanks again for your help

    Daz

  4. #4
    Join Date
    Oct 2002
    Posts
    16
    Anyone????

  5. #5
    Join Date
    Oct 2002
    Posts
    16
    Does nobody know how to do this????

    Come on! There must be some experts out there who know how to do this???

    If not, what forum can I go on to post this question, where I will get an answer? Anyone know??

    Thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •