Results 1 to 9 of 9
  1. #1
    andvidal is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Jan 2018
    Posts
    10

    Disable save in forms

    Hi, I have a little problem. (I think it's a very noobie question )

    When I close a form, the program tries to save a record, generating several errors.
    There's a way to disable that?

    Thanks!

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,550
    if you set the form property : RECORDSET TYPE = SNAPSHOT.
    users cannot save

    or
    ALLOW EDITS = FALSE

  3. #3
    andvidal is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Jan 2018
    Posts
    10
    Didn't work. I will try to explain myself better.

    I use a form, for example, to input a UserID into a query. The UserID input is linked with the Users table, because I use a list.
    But then, when I have to close the form, the program tries to create a new register with the UserID.

    I'm trying to use the correct words , but I'm not English native speaker, and probably there will be a lot of mistakes. (I use the program in another lenguage).

    Any idea?

  4. #4
    aytee111 is offline Competent At Times
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    You can use Me.Undo in the OnClose event.

  5. #5
    andvidal is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Jan 2018
    Posts
    10
    me.undo didn't work either

  6. #6
    John_G is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615
    Is the form a login form, which where the user selects the ID from a listbox? If so, the form probably does not need a record source, because it is not adding data to anything. Try removing the record source from the form's properties.

  7. #7
    andvidal is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Jan 2018
    Posts
    10
    I tried that too. But if I remove the record source from form's properties I can't generate the listbox.

    EDIT: I solved it, just have to use me.undo in before add and before update events.

    Thanks everyone for your help !

  8. #8
    orange's Avatar
    orange is online now Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,870
    andvidal,

    You can write your description in your native language with as much detail as needed. Then use Google translate to convert it to English and post it.
    Would also help if we could see the database --please provide instructions on how to get to or reproduce the error.

    A Form has a recordsource.

    A Listbox has a rowsource.



    Good luck.

  9. #9
    John_G is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615
    But if I remove the record source from form's properties I can't generate the listbox.
    Then you are doing something wrong to create the listbox. The items in a listbox do not depend on the record source of a form.

    How are you creating the list of items in the listbox?

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

Similar Threads

  1. Disable save?
    By tylerg11 in forum Access
    Replies: 4
    Last Post: 09-24-2013, 07:12 PM
  2. Replies: 30
    Last Post: 10-28-2012, 02:43 PM
  3. How to disable save/close window in form
    By Kivan in forum Access
    Replies: 2
    Last Post: 08-16-2012, 02:52 AM
  4. Replies: 1
    Last Post: 08-13-2012, 01:25 PM
  5. Replies: 21
    Last Post: 05-20-2012, 02:15 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