How to get Dropdown filter box to save the last selection even after a user navigates away from a form and comes back again

Db-why-not

Registered User.
Local time
Today, 00:35
Joined
Sep 17, 2019
Messages
160
I have 3 dropdown boxes that filters a list for me on a form. I want the selection of the dropdown box to be saved for the form, for when a user navigates off the form and comes back again to the same form. When the User navigates to a form again, I want there previous selections in the dropdown boxes to automatically be selected when they open the form again. Example Dropdown box for Month. IF MArch is selected, I want march to open up selected if the user navigates off the form and come back to the same form again.

I have a list that can be filtered, then user selects one of the records and it navigates them off the current page. When they are done editing the record they selected, The user has to go back to the list page again to select another record and I don't want them to have to redo all the dropdown filters they previously selected, I want the previous filters they currently set to open up automatically, when they reopen the list.
 
Hi. One way to persist data is to save it to a table. Another approach is to use custom properties. There are other methods too.
 
The user has to go back to the list page again to select another record and I don't want them to have to redo all the dropdown filters they previously selected,

You could just leave the form open but hidden or minimised. If the form has to be closed, use global variables or tempvars and in the form open event apply them to the combos. If the user closes the application and you want those selections to be reinstated the next time they open the app then you'll have to store them in a table.
 
It might be a good time to begin something starting with a table, like maybe ... tblPreferences
This way you can store all kinds of things and then look them up later like:

Code:
Me.cmbChoice.Value = nz(dlookup("cmbChoiceSelection","tblPreferences","NetworkUsername='" & GetUserID() & "'"),"")

I love storing user preferences. Because I know people love shortcuts and customization. One of the neatest things you can do in GUIs
 

Users who are viewing this thread

Back
Top Bottom