Entry of data in form

  • Thread starter Thread starter Eric
  • Start date Start date
E

Eric

Dear all

I've a form that allow user to input some data. i wonder if there is a way
that i can keep some of the data of pervious records for next one. So, the
user do not have to repeat again and again

Thanks for your recommendation

Eric
 
Dear all

I've a form that allow user to input some data. i wonder if there is a way
that i can keep some of the data of pervious records for next one. So, the
user do not have to repeat again and again

Thanks for your recommendation

Eric

You can use a little vba code in the AfterUpdate event of a control:

Private Sub controlname_AfterUpdate()
Me.ControlName.DefaultValue = """" & Me.ControlName & """"
End Sub

That's four quotemarks before and after. This will set the default value of
the control to whatever the user entered, making the value "sticky" until it's
overtyped.

It's possible that your table design needs attention; if you *routinely* have
many repeating fields, you may need to normalize the data into two tables
related one to many. You can store the "one" side data in one table and the
"many" side data in the second table and use a form/subform to enter it.
 
Linq
Thanks

if the field that is going to repeat in each record is the field "remarks"

I should write :
Private Sub remarks_AfterUpdate()
Me.remarks.DefaultValue = """" & Me.remarks & """"
End Sub

or

Private Sub ControlName_AfterUpdate()
Me.ControlName.DefaultValue = """" & remarks.Value & """"
 
Private Sub remarks_AfterUpdate()
Me.remarks.DefaultValue = """" & Me.remarks & """"
End Sub
 
Back
Top