Results 1 to 12 of 12
  1. #1
    5 Star Lounger
    Join Date
    May 2003
    Location
    Sheffield, Yorkshire
    Posts
    951
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Temp Unlink (2003)

    I've created a form which takes information from two tables, which are linked. One of the tables is created using 'Make table query', and has to be updated. This can't be done without removing the link. Since the user has no knowledge of links etc, is there any code I could write to unlink the table, re-run the query, and link the tables again? It has to be a table rather than a query, because some of the fields have to have data entered into them, unless someone can suggest something easier.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Temp Unlink (2003)

    Can't you use an update query instead of a make-table query? It seems rather risky to do what you ask in a production database.

  3. #3
    5 Star Lounger
    Join Date
    May 2003
    Location
    Sheffield, Yorkshire
    Posts
    951
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Temp Unlink (2003)

    You could be right, I'll try that. The authors of the system tell us that we can extract data, but it won't allow us to write.

  4. #4
    5 Star Lounger
    Join Date
    May 2003
    Location
    Sheffield, Yorkshire
    Posts
    951
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Temp Unlink (2003)

    Get the message 'Updating data in a linked table is not supported by this ISAM

  5. #5
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Temp Unlink (2003)

    Then your query is updating the wrong table, or it is not designed correctly. I assume it is not your intention to update a linked table.

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

    Re: Temp Unlink (2003)

    Back up a minute. MakeTable queries normally run in the current database. A table in the current database isn't linked but it may have relationships with other tables. Are you sure you're talking aren't talking about relationships rather than links? Or is the make table query creating a new table in a different database?
    Charlotte

  7. #7
    5 Star Lounger
    Join Date
    May 2003
    Location
    Sheffield, Yorkshire
    Posts
    951
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Temp Unlink (2003)

    Sorry. Yes, I'm talking about relationships. The table I want to update has a relationship with another table.

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

    Re: Temp Unlink (2003)

    Maketable queries do not create tables with keys or relationships, so there is obviously more going on here than you have explained. Where are the tables in question located (current database, back end, or ...?) and how did the relationship get created in the first place? If both tables are in a linked database, you can't do it the way you propose. We need more information in order to assist you.
    Charlotte

  9. #9
    5 Star Lounger
    Join Date
    May 2003
    Location
    Sheffield, Yorkshire
    Posts
    951
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Temp Unlink (2003)

    The main table tables I want to extract my information from, are linked tables with relationship. A module created by the manufacturers links the tables into my database. I use a Make table query to extract the fields I want from each linked table, into a new table. I need to get this information into a form, with a subform so I can add data and then save the collective information into a new table for later use. I do this because the linked tables are updated, and I want to keep the information I retrieve. Hope this makes sense to you.

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

    Re: Temp Unlink (2003)

    I'm sorry, but I'm completely baffled by your description of what you're trying to do. Make table queries don't use relationships in the target table because that table is being created by the query and no relationships exist. Where does the form and subform come into the picture, and what do you mean by "collective information"? You say
    <hr>... so I can add data and then save the collective information into a new table for later use. <hr>
    Is that "new table" the product of the maketable query or is there still another procedure we haven't heard about? It would help if you would explain each step you are trying to take instead of summarizing what you want to achieve. It's hard to tell why you're having problems when we can't figure out exactly what you may be doing to cause them. <img src=/S/sorry.gif border=0 alt=sorry width=15 height=15>
    Charlotte

  11. #11
    5 Star Lounger
    Join Date
    May 2003
    Location
    Sheffield, Yorkshire
    Posts
    951
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Temp Unlink (2003)

    I'll try to explain what I'm trying to achieve, I may not be doing it the right way. We have linked tables that come from manufacturing software. From these tables we need to extract information using a query, as all the information is in different tables. We want to use this information in a form. We need another table to which we can add data. So we have extracted data, and user input data. We then use information from both sources to create a report in the form of a delivery note.

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

    Re: Temp Unlink (2003)

    Then I still fail to see what relationships have to do with this. You create a new table with a maketable query. You append records to it from one or more of the linked tables through an append query. You update it with an update query. At what point are you being troubled with not being able to create a record because of a relationship?
    Charlotte

Posting Permissions

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