Question Using a combo box to set default value for subsequent records (1 Viewer)

linskill

Registered User.
Local time
Today, 19:47
Joined
Nov 1, 2012
Messages
38
Hi All
I am trying to create a user friendly form to enter a list of competitors entering an event.
I would like the user to pick from a list of events and that event to be used for subsequent records until the user changes it.
I have used a combo box to pick from a list of events but that needs to re-selected for every new record. I then added a second unbound combo box to give the main combo box its default value. It works but is not very user friendly.
Has anyone got a better suggestion.
 

DavidAtWork

Registered User.
Local time
Today, 19:47
Joined
Oct 25, 2011
Messages
699
Start with your first combo and get the user to select an event from the list, after update you then display your form to add a new competitor record. Once the name details have been entered you can set the event by making it equal to
Forms!yourForm.ComboSelectEvent value. Just keep adding records and it will use the selected Event for each new record
David
 

linskill

Registered User.
Local time
Today, 19:47
Joined
Nov 1, 2012
Messages
38
Thanks for your reply, could you be a bit more specific.
I cant work out just where I set this value.
Thanks
 

NeutronFlux

Registered User.
Local time
Today, 14:47
Joined
Aug 20, 2012
Messages
78
Try something like this. In the Properties of the combo box, look for the After Update event. Use Code Builder/VBA:

Code:
' Replace ComboBoxName with the name of your combo box. 
Private Sub ComboBoxName_AfterUpdate()
    ComboBoxName.DefaultValue = ComboBoxName.Value
End Sub

See if that works.
 

linskill

Registered User.
Local time
Today, 19:47
Joined
Nov 1, 2012
Messages
38
Many thanks for pointing me in the right direction. I was trying to put it into the combo boxes properties default value. Its easy when you know how!
 

Users who are viewing this thread

Top Bottom