Page 3 of 3 FirstFirst 123
Results 31 to 33 of 33
  1. #31
    deepaksharma is offline Competent Performer
    Windows 7 32bit Access 2016
    Join Date
    Jul 2023
    Location
    india
    Posts
    389
    Quote Originally Posted by Minty View Post
    @Jouneyman - you have picked the wrong event for your code, you need to do all the validation in the FORMS before update event, than you can issue a cancel = true and stop anyone leaving the form.
    If you issue an Me.Undo it will undo the whole form.

    Your idea of local temporary table(s) has already been discussed at length by two other responders and is almost as difficult to manage in a multiuser environment, when you take into consideration locking records being edited by someone else etc.

    This is the second thread by the OP on this subject and he was finally coming round to accepting the limitations of his original approach, you are unfortunately covering old ground.
    Minty, I have made some changes in the program as suggested by you. In this program, I have hidden the sub form. Now as soon as the user fills all the fields of the main form and clicks on the sub form button, only then the sub form will be visible and the main form's all text boxes will be disabled so that the user cannot make any changes to the saved data of the main form.
    Now after filling the sub form, clicking on Save button will make the sub form disappear again and the form will open with a new blank record.
    If any necessary changes need to be made to make it better, please give your suggestions.
    Thank you.
    Attached Files Attached Files

  2. #32
    Minty is online now VIP
    Windows 10 Office 365
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,003
    I don't have time to look at the moment, but if it meeting your requirements then I would suggest you have solved your issue.
    DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
    Please use the star below the post to say thanks if we have helped !
    ↓↓ It's down here ↓↓

  3. #33
    journeyman is offline Advanced Beginner
    Windows 11 Access 2016
    Join Date
    Dec 2022
    Posts
    82
    Quote Originally Posted by Minty View Post
    @Jouneyman - you have picked the wrong event for your code, you need to do all the validation in the FORMS before update event, than you can issue a cancel = true and stop anyone leaving the form.
    If you issue an Me.Undo it will undo the whole form.
    You're right. I initially started with the form BeforeUpdate event, and somehow ended up with the text box. that's what happens when you're working from faulty memory in a thread.

    The idea of a temporary table is for consideration in this thread only. I didn't read OP's other threads. OP has to consider his own logic to make it work. I'm merely contributing - take it or leave it.

Page 3 of 3 FirstFirst 123
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 4
    Last Post: 11-14-2019, 11:30 AM
  2. Can't test code - "Debug" - "Run to Cursor"
    By GraeagleBill in forum Programming
    Replies: 4
    Last Post: 05-15-2016, 05:16 PM
  3. Replies: 2
    Last Post: 12-23-2015, 09:32 PM
  4. Replies: 1
    Last Post: 09-07-2015, 08:00 AM
  5. Replies: 4
    Last Post: 07-12-2014, 02:02 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