Allowing user to set default value (1 Viewer)

jmt90404

Registered User.
Local time
Today, 10:38
Joined
Mar 24, 2018
Messages
29
Newbie here. I want to create a settings form that allows the user to set the default value of a field on a different form for new records. How would I go about doing that? Appreciate the help.
 

Micron

AWF VIP
Local time
Today, 10:38
Joined
Oct 20, 2018
Messages
3,476
You mean you want this to be a permanent user option but allow it to be different for each user each time they open said form? You would need a table for such user options. To build it into the actual form design would be problematic if it's a split db with various users.
I suppose you could pass the value to the opening form if a user has a place to set it, but it would require inputting the default value every time the form opens.
 

jmt90404

Registered User.
Local time
Today, 10:38
Joined
Mar 24, 2018
Messages
29
No, the default value is the same for all users, but just needs to be changed from time to time.
 

Micron

AWF VIP
Local time
Today, 10:38
Joined
Oct 20, 2018
Messages
3,476
Then you do want it to be semi-permanent - until such time as it needs to be changed. So many ways you could do this.

A table for db parameters is one way to go. I sometimes use these for various aspects of a database. It's not likely that you can include such a field in your form's underlying record source, and if you show the value via DLookup, you can't edit such a calculated control if you want to change it. You'd need an alternate method such as a form for editing db parameters or a popup form just for this one value.

If the values are a static list, then you could use a combo on said form with either a value list or again, a table of records. This way a different value can be chosen from a set list. Being unbound, you'd have to set the target control default property on AfterUpdate of the combo.

Anything else I can think of would need to be input every time the form opens, which isn't what you want, I guess. You don't want anything like option buttons that would require modifying form design like that. Truthfully, altering a value list falls into that realm AFAIC. Likely others will chime in with good or even better ideas.
 

Users who are viewing this thread

Top Bottom