Results 1 to 9 of 9
  1. #1
    Lounger
    Join Date
    Aug 2001
    Posts
    33
    Thanks
    0
    Thanked 0 Times in 0 Posts

    creating database in a form (2000)

    I have a form that I have a combo box on which once the choice is made from the combo box it links up to other fields. Once this information has been retreived I would like to take that information only and put it into a new database. Is this possible? if so, how?

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: creating database in a form (2000)

    Could you explain in a little more detail? When you say it links up to other fields, do you mean it populates the form with the data from a specific record? You then want to take that specific information and export it to another database? Or are you talking about inserting the data into a record in another table? What exactly are you trying to accomplish here?
    Charlotte

  3. #3
    Lounger
    Join Date
    Aug 2001
    Posts
    33
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: creating database in a form (2000)

    Yes, when it links up to the other fields it populates the form with the data from a specific record. Then I want to take all of that information and export that info only to a new database.

  4. #4
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: creating database in a form (2000)

    Do you mean you want to append that data to a table in another database? Does the "new" database already exist? Does the table already exist? What are you trying to accomplish with this?
    Charlotte

  5. #5
    Lounger
    Join Date
    Aug 2001
    Posts
    33
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: creating database in a form (2000)

    The new database does not exist yet. But once the form is in use, everytime someone uses it the info retreived from a specific record will be appended to this new database. What I am trying to accomplish: We create new items (with new item #'s) to be sold to our customers each year. One item# may have several parts that make up that one item. I want to be able to keep a comprehensive list of all new item#'s and there corresponding parts (and other info regarding that particular part) .

  6. #6
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: creating database in a form (2000)

    'm still confused. If they're retrieving a record from somewhere, then that information already exists in its present form. So what's the purpose of writing it again elsewhere. And are you talking about a new mdb file or something else? If the former, how were you planning to create it and how were you going to manage all those files scattered about?
    Charlotte

  7. #7
    Lounger
    Join Date
    Aug 2001
    Posts
    33
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: creating database in a form (2000)

    I have one database file already created. It consists only of part #'s and the corresponding info about that particular part. But what I want to create now is a new database with the key field as the new item# and then all the part #'s needed to make up that item. By using a form, I am able to enter the new item # then from my combo box I choose a part # that helps make up that item (and all info about that part #). Then what I would like to have is a command button that would send all the info I have on the screen to a new database. Then if there is another part # that makes up this item. I choose another part # from the combo list and then add that info to the same newly created database. Then if I have another new item #, I enter the new item#. Choose from the combo list the part # that makes up that item. Then add it to the same database as before. Then if more part #'s needed to make that item, I go back to the combo box and choose another part then add it to the same database.

  8. #8
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: creating database in a form (2000)

    I think you're talking about a table, not a database. The database is the mdb file. You store the data in tables within the database.

    What you should do is have a table (perhaps called ItemPart) that relates the Item# with the part#, with the combination of the two fields creating a unique key-- assuming that you can only add the same part# once to an item#. For each new part for an item, you would append a record to the table and insert the item# and the part# from your form.

    I would expect there to be a table of items that would include the item# for each new item and information about the item itself, such as when it was created, what you call item, etc. The primary key for that table would be the item#.

    By the way, I would recommend against using the # in your field and table names although it's OK to use them in captions. If you use characters like that, you'll have to always put brackets around the field and table names when you refer to them in SQL or in code.

    You could use an append query executed from code or a macro in the AfterUpdate event of your part# control on the form. Create the query using references to the form's controls, which will always give you the values for the current record, and save the query. Then all you have to do is call it to append a record to your table.
    Charlotte

  9. #9
    Lounger
    Join Date
    Aug 2001
    Posts
    33
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: creating database in a form (2000)

    Thanks for your help. I created an append query then inside my form under the parts combo list in the after update column I used a macro. But every time it goes thru the macro it does the append query but then it does not transfer the records. Any suggestions why?

Posting Permissions

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