Results 1 to 2 of 2

run vba once specific record is opened in form

  1. #1
    mainerain is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Sep 2018
    Posts
    36

    run vba once specific record is opened in form


    I would like to change a forms Recordset Type after a specific record has been loaded. I want to disable the ability to change a records data after a specific record has "loaded". I can change the Recordset Type before but that messes up loading a specific record. Thanks

  2. #2
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    20,135
    I would probably toggle the Allow Edits property of the form from the Current event. Pseudo code:

    Code:
    If Me.FieldName = 123 Then
      Me.AllowEdits = False
    Else
      Me.AllowEdits = True
    End If
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Replies: 18
    Last Post: 08-02-2017, 12:56 PM
  2. Replies: 20
    Last Post: 06-22-2017, 10:36 AM
  3. Replies: 16
    Last Post: 02-13-2017, 09:29 PM
  4. Replies: 3
    Last Post: 11-28-2016, 03:17 PM
  5. Replies: 5
    Last Post: 10-18-2016, 06:00 AM

Posting Permissions

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