fill current record with data from previous record

irade92

Registered User.
Local time
Today, 17:08
Joined
Dec 26, 2010
Messages
229
how to fill current record with data from previous record automatically
Actually If I chose a value from a combo box I want that value to be default value for the next record
Thanks
 
Last edited:
The following code, in the Combo's On Change event will set the Default Value of the Combo;
Code:
Me.YourComboName.DefaultValue = Me.YourComboName
You may also want to clear the Default Value when the form is closed so that the Combo does not retain the last Default from the last time the form was used. The following code in the Form's On Close event should do the trick;
Code:
Me.YourComboName.DefaultValue = ""
 
Actually, because the OnChange Event fires every time a character is entered, as it can be in a Combobox, I use
Code:
Private Sub YourControlName_AfterUpdate()
   Me.YourControlName.DefaultValue = """" & Me.YourControlName.Value & """"
End Sub
which can be used in any data-entering Controls regardless of the Datatype of the underlying Field.

Linq ;0)>
 

Users who are viewing this thread

Back
Top Bottom