Results 1 to 5 of 5
  1. #1
    Beppe is offline Advanced Beginner
    Windows 10 Access 2010 64bit
    Join Date
    Sep 2017
    Posts
    33

    Keeping data from a form to another

    Hello everyone!
    I have a mask where the user inserts some fields (textbox, combobox...). When I navigate through records by clicking on the right and left arrows below the access mask some values (namely that ones selected through comboboxes) expire...
    I need to keep them saved in the mask, how can I do it?

    Feel free to ask more info

    Thanks in advance


    Beppe

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,825
    Exactly what do you mean by 'mask'?

    Those comboboxes have conditional RowSource with lookup alias? Review thread, especially post 10, https://www.accessforums.net/showthread.php?t=68061
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    Beppe is offline Advanced Beginner
    Windows 10 Access 2010 64bit
    Join Date
    Sep 2017
    Posts
    33
    Excuse me I translated wrongly..I didn't know the term in english, I mean "form"

    I tried this but it does not work

    Code:
    Private Sub CasellaCombinata451_AfterUpdate()
    
    
    Const cQuote = """"
    Me!CasellaCombinata451.DefaultValue = cQuote & Me!CasellaCombinata451 & cQuote
    
    
    End Sub

  4. #4
    Beppe is offline Advanced Beginner
    Windows 10 Access 2010 64bit
    Join Date
    Sep 2017
    Posts
    33
    In addition, I would like that the value selected from the user in the combobox will remain the same after I close and reopen the form

  5. #5
    Beppe is offline Advanced Beginner
    Windows 10 Access 2010 64bit
    Join Date
    Sep 2017
    Posts
    33
    I found this online:

    "1. Use the AfterUpdate event of the combo to assign its DefaultValue.

    2. In the Unload event of the form, save its DefaultValue into a table.

    3. In the Load event of the form, read the value from the table, and assign
    it to the combo's DefaultValue."

    Can someone please help with the code?

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

Similar Threads

  1. Replies: 7
    Last Post: 06-12-2013, 06:36 AM
  2. concatenation for a field, keeping the masking data
    By finsmith in forum Programming
    Replies: 11
    Last Post: 01-26-2013, 04:26 AM
  3. Replies: 8
    Last Post: 07-09-2012, 07:19 AM
  4. Replies: 2
    Last Post: 03-01-2012, 11:14 AM
  5. Memo Field Not Keeping Data
    By maintt in forum Forms
    Replies: 1
    Last Post: 08-12-2010, 05:55 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