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
Thanks
Frank
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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
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
ASKER
Thanks works great.
<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.