RE: Combo Box Selection Remain Static Upon Adding New Record?

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Kevin Sprinkel (anonymous_at_discussions.microsoft.com)
Date: 05/13/04


Date: Thu, 13 May 2004 11:18:36 -0700

Access doesn't know what "InputEmployee" means, you need
Me! in front of it also. Technically, what you're doing
is assigning the control's value of the current record
(the Value property) to the DefaultValue property. Since
Value is the default property of a combo box, you don't
need to refer to it explicitly. Either of the following
should work:

Me![InputEmployee].DefaultValue = Me![InputEmployee].Value

or

Me![InputEmployee].DefaultValue = Me![InputEmployee]

And, BTW, it was MY error not explicitly referencing the
form. Sorry for holding you up.

Best regards.
Kevin Sprinkel

>Private Sub InputEmployee_AfterUpdate()
>
> Me![InputEmployee].DefaultValue = InputEmployee
>
>End Sub