Results 1 to 2 of 2
  1. #1
    louise is offline Competent Performer
    Windows 7 64bit Access 2013
    Join Date
    Apr 2015
    Posts
    112

    Update a record without moving to the next one

    Hello,
    I have a form designed to assemble a three-part text-field "Course Label" , from two existing fields and one entered (a sequential numbering):
    Part 1 A text field SEMTYPE created with a query (e.g., FSS- indicates Fall & Single Session)
    Part 2 A field that is filled in with a number, COURSENUM, going down the form, assigning the numbers in sequence
    Part 3 An asterisk or nothing ASTERISK

    The result is a field labeled COURSECODE created by the "After Update" event of the COURSECODE field: SEMTYPE & COURSENUM*ASTERISK
    The result would look, for ex., like FSS-1* or SS-5
    So, when the user enters the COURSENUM ***and moves to the next record***, the course code is created and displayed for the previous record.



    BUT the problem is that the user occasionally changes the COURSENUM field but doesn't move to the next field -- so the change is not made.
    I have tried On Dirty but that doesn't work either.

    I would appreciate any suggestions!
    Thanks

  2. #2
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 8 Access 2013
    Join Date
    Aug 2013
    Posts
    7,862
    I do not usually use it, but you might try the Refresh Method of the form. According to MSDN, if you change the data of an underlying recordsource via code or another user, the Refresh method will show the changes made by others.

    Before you make changes using code, save the form with the Dirty property. Then use code to change the data in the table(s). Then try the Refresh method. The way I understand the Dirty property is that it's a property of the form and is looking at the changes made to its own Recordset, not changes in the table, itself.
    https://msdn.microsoft.com/EN-US/lib.../ff836021.aspx

    If the Refresh does not work, then you will need to do a requery. I usually use requery, however, you will need to use additional code to maintain the Current Record if you are using Single Form View.

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

Similar Threads

  1. Replies: 1
    Last Post: 10-20-2013, 06:37 PM
  2. Loop function not moving to next record
    By jax1000rr in forum Programming
    Replies: 3
    Last Post: 02-26-2013, 12:21 PM
  3. Replies: 3
    Last Post: 09-19-2012, 07:34 AM
  4. Moving to new record from a different form
    By liam_898 in forum Forms
    Replies: 12
    Last Post: 05-05-2012, 12:34 PM
  5. Moving a record.
    By Cutter596 in forum Queries
    Replies: 1
    Last Post: 08-02-2011, 02:49 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