Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

combobox prefered first selection

Status
Not open for further replies.

matrixindicator

IS-IT--Management
Sep 6, 2007
418
BE
Is there an easy way with vba to say next ...
I have a subform menu where every next new record has besides textboxes a combobox. Every next record combobox menu should show first the previous selection.

Eg. In the first record dropdown the user select "Bread".
The second record dropdownbox should first show "Bread".
If the user select another option like "Wine" the next record dropdownbox should show "Wine" as first selection. And so on ...
 
Change the DefaultValue property of the combobox in its AfterUpdate event procedure.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
And you'd do that simply by

Code:
Private Sub ComboBoxName_AfterUpdate()
  Me.ComboBoxName.DefaultValue = """" & Me.ComboBoxName.Value & """"
End Sub

The Missinglinq

Richmond, Virginia

There's ALWAYS more than one way to skin a cat!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top