Results 1 to 9 of 9
  1. #1
    Join Date
    Aug 2003
    Posts
    3

    Cool Unanswered: move a record to a different table

    Hi there Helpers!!

    How do I move a record through Data Access Page from one table to another with a click of a button.

    thank you

  2. #2
    Join Date
    Apr 2002
    Location
    Illinois
    Posts
    133

    Re: move a record to a different table

    Try an Append query.
    SteveH

  3. #3
    Join Date
    Aug 2003
    Posts
    3
    ok. how do I attach that query to a button in a data access page?

    e

  4. #4
    Join Date
    Apr 2002
    Location
    Illinois
    Posts
    133
    Originally posted by superewa
    ok. how do I attach that query to a button in a data access page?

    e
    I am assuming you mean a button on an Access form. Correct me if I am wrong.

    In the button's properties window in the "OnCLick" event, build a macro that will run the query or choose the code builder and use:

    DoCmd.RunQuery "<query name>"
    SteveH

  5. #5
    Join Date
    Aug 2003
    Posts
    3

    Cool

    Hey Steve!!! Thanks for quick response.
    Here's what I'm trying to do.

    I'm setting up intranet and need to have a page with data and a button by each record. When user clics on the button the record is erased from the current table and moved to a different table in a database.

    I was trying to set up Data Access Page out of Access (not an Access form), but maybe I need to do it in ASP?

    thank you again
    ewa

  6. #6
    Join Date
    Apr 2002
    Location
    Illinois
    Posts
    133
    ewa,

    Sorry I can't help you here. Intranet and Data Access Pages are out of my league. I hope someone else can help.
    SteveH

  7. #7
    Join Date
    Mar 2004
    Posts
    69
    I'm trying to do something similar. I got a form sowing continous records I've got a button on each record to run a append query. The query copys all records to the new table but I only want the one i've selected for the row. In my append query how do i set the criteria to select only the selected row im running the query from . Hope this makes sence.

  8. #8
    Join Date
    Apr 2002
    Location
    Illinois
    Posts
    133
    Here's one option. Have the button on your continuous form open another form (example: frmRecordSelection). This form will have a field (txtRecordToAppend) where the user will enter a unique value (example: Employee ID) from the record that is to be appended. A button on frmRecordSelection can run an append query in which the criteria for the unique value is based on txtRecordToAppend.

    I hope this helps.
    SteveH

  9. #9
    Join Date
    Mar 2004
    Posts
    69
    I've got it working the problem I was having is that it was a subform and didn't use the correct parent child link to access the relavent field. I've managed to use a append query to move the record to another table an a delete query to remove it form the original table. Now I'm trying to add vb code to refresh the subform but not sure of the correct way to refresh it. If i place a refeash button using the wizard on the subform it doesn't refresh the form but if i place it on the parent form it works. I want to add vb code to my archive command button to refresh the subform how do I do this. I cant seem to get the sytax right for the .refresh command.

Posting Permissions

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