Updating table using command button and clearing text box in the form

atimsina

New member
Local time
Today, 14:36
Joined
Jun 9, 2016
Messages
5
Hi, I am working on a table that I want to update using form. I want to use that form to insert record in the table. The table is bound with the form. My problem is that once I save the record the form still has the text that i entered which i want to be cleared once i click on Save button. I used Me.Textboxname = NULL but this doesn't save the record in table but just clears the text box.

Thank you,
Ashes
 
Then set the form's property "Data Entry" to "Yes".
If the form is bound to the table, you actually don't need to save the data it is done automatic, so change the code behind the button to:
Code:
Me.Requery
 
Hi, I did as per your advise but the data is not saved in table instead a blank row is created with no data in the field. The form goes blank but data is not saved in table.
 
Set the controls "Control Source" to the table fields.
 

Users who are viewing this thread

Back
Top Bottom