Results 1 to 4 of 4

Thread: Prompt Query

  1. #1
    Join Date
    Oct 2002
    Location
    Hartford, CT
    Posts
    106

    Unanswered: Prompt Query

    How can I create a dinamic query to prompt for the table name. I would like to update the same field (Name) but in many tables. I would like to have one query built but give the user the abelity to enter the table name on the fly.

    e.g.

    UPDATE Table_Name
    SET Table_Name.[Zip Code] = "0" & "" & ([Zip Code])
    WHERE (((Len([Zip Code]))=Val(4)));

    Cany I?

    Thanks
    Mo

  2. #2
    Join Date
    Jul 2002
    Posts
    67
    Just a thought...

    Use a form that gives the list of possible table names to the user in a control such as a listbox or combo box. Then, pass the value of the table name to the update statement in your code behind the form. Use a command button to execute the code.

    HTH
    Don't do today, what can be done tomorrow.

  3. #3
    Join Date
    Oct 2002
    Location
    Hartford, CT
    Posts
    106

    Thumbs up

    Thanks for teh suggestion, I will try that.
    Mo

  4. #4
    Join Date
    Oct 2002
    Location
    Hartford, CT
    Posts
    106
    Is there a system query that returns a list of the table names in Access?

    Thanks.
    Mo

Posting Permissions

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