Link to home
Start Free TrialLog in
Avatar of sciarref
sciarref

asked on

Adding record through a text boxes enter event

I am new to Access and was trying to find the code to add to a text box's enter event to add a record after the uses hits enter, using the contents of the all the text boxes on the form for the record.  Can somebody give me some beginner VB code for this?

Thanks
Frank
ASKER CERTIFIED SOLUTION
Avatar of mbizup
mbizup
Flag of Kazakhstan image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
<enter event>
<add to a text box's enter event to add a record after the uses hits enter,>

The event you are describing would actually be the textbox's after update event.

I'd recommend using a command button's click event to insert a record instead.
Hi sciarref,

If your text box is bound to table or query field, just place Dirty = False into its After Update event.
See snippet below for an example


Private Sub Field1_AfterUpdate()
Dirty = False
End Sub

Open in new window

Avatar of sciarref
sciarref

ASKER

Thanks works great.