Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2017
    Location
    Tanjung Pinang
    Posts
    2

    Unanswered: Update Data and Re-Print Report using Form, with autonumber Primary Key

    Hi all,

    Im newbie here. I have a access project, and in that project I want to update the Table (that show in SubForm) using Access form. I learn it before from youtube channel https://www.youtube.com/watch?v=Ri2Y9-16AEo&t=313s.

    But now I have a problem to updating that data. The problem is my autonumber primary key (that cannot/supposed to be not change), if my primary key is not auto number it will fine and get succeed.

    And the other thing, I need to re-Print the report that Updated data.

    Could you help me with this things? Thanks before...

  2. #2
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    629
    Provided Answers: 34
    Yes,you shouldn't update primary keys.
    To reprint a report using that key on the form,filter the report :

    Docmd.openReport "report",acPreview,"[key]=" & me.txtBox

  3. #3
    Join Date
    Jan 2017
    Location
    Tanjung Pinang
    Posts
    2
    Quote Originally Posted by ranman256 View Post
    Yes,you shouldn't update primary keys.
    To reprint a report using that key on the form,filter the report :

    Docmd.openReport "report",acPreview,"[key]=" & me.txtBox
    Thanks for the explanation, ranman.

    And about re-print my Report, using that expression always go to the first record, meanwhile I want to re-print just the updated data (that it could be not the first record or the last record).

    Could you help me?
    Last edited by kriNyoL; 01-03-17 at 22:33. Reason: Focusing just for re-print Report in custom number

Tags for this Thread

Posting Permissions

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