Results 1 to 5 of 5
  1. #1
    keish is offline Novice
    Windows 10 Access 2007
    Join Date
    Aug 2022
    Posts
    3

    Retain original value of a field after editing on current subform

    Hi all,


    I have a form (Visit) with a subform (Drugs) having Drug, Frequency and Duration as columns. Choosing a drug will bring up corresponding duration and frequency, which are already entered in a table. I want to edit the frequency or duration occasionally on subform and print out, but want to retain the original values in table. I tried OldValue property, but showing error. Please help.Click image for larger version. 

Name:	Annotation 2022-08-11 103312.png 
Views:	25 
Size:	10.3 KB 
ID:	48498

  2. #2
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    I wouldn't mess with data that you want to be static because things will invariably go wrong. Since bound controls are so much easier to deal with, consider using a staging table where you put a copy of the record to which the form is bound, edit that record and do whatever (e.g. print). When done, delete the record from the staging table. If this is a split db with multiple users and each is using a copy of the front end, easiest approach is to put the table in the user front end. Otherwise you have to associate a user record with that user so that they only delete their own.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  3. #3
    Bulzie is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    Nov 2015
    Posts
    1,463
    Not sure if yours works like this but say the Drug combo box will also show Freq and Duration in the list, so when you select the Drug, in AfterUpdate you do the me!Frequency = me!Drug.column(2), me!Duration = me!Drug.column(3) etc.? Then you can just go in and edit either one of those fields if needed. Or are Freq and Duration lists in their own tables?

  4. #4
    keish is offline Novice
    Windows 10 Access 2007
    Join Date
    Aug 2022
    Posts
    3
    Thanks for your advice. Will try it.

  5. #5
    keish is offline Novice
    Windows 10 Access 2007
    Join Date
    Aug 2022
    Posts
    3
    Thanks for your valuable advice. Will update if it works.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 1
    Last Post: 04-17-2020, 09:01 AM
  2. Replies: 14
    Last Post: 11-04-2015, 09:44 AM
  3. Replies: 3
    Last Post: 12-03-2014, 01:40 PM
  4. Replies: 12
    Last Post: 11-07-2014, 01:45 PM
  5. Problem editing Memo field in a subform
    By hertfordkc in forum Forms
    Replies: 2
    Last Post: 11-04-2014, 04:12 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums