captainlove
captainlove
- Local time
- Today, 14:33
- Joined
- Apr 18, 2008
- Messages
- 39
I have a main form with a combo box, containing a list of qcps(numeric values)
on that main form is a text box to add to my subform data like references or responsibilities for each qcp i.e 10000
The problem is that when I add data to the text box and I click accept, which insert the value into a table. The data in the text box still stay.
My question is, what code do I put in the afterupdate event of the mainform to clear text after hitting the accept button to accept the data
Below is an example of my accept code and delete code on the form
delete code
-------
Sql = "Delete from tblresponsibilities where resp_id =" & Me.ID
DoCmd.RunSQL Sql
Accept code
-----------
Sql = "INSERT INTO tblResponsibilities(responsibilities,qcpID) VALUES ('" & Me.txtresponsibilities & "','" & _
Me.txtQcp & "' )"
DoCmd.RunSQL Sql
so I guess I need the after update code.
Can anyone help
on that main form is a text box to add to my subform data like references or responsibilities for each qcp i.e 10000
The problem is that when I add data to the text box and I click accept, which insert the value into a table. The data in the text box still stay.
My question is, what code do I put in the afterupdate event of the mainform to clear text after hitting the accept button to accept the data
Below is an example of my accept code and delete code on the form
delete code
-------
Sql = "Delete from tblresponsibilities where resp_id =" & Me.ID
DoCmd.RunSQL Sql
Accept code
-----------
Sql = "INSERT INTO tblResponsibilities(responsibilities,qcpID) VALUES ('" & Me.txtresponsibilities & "','" & _
Me.txtQcp & "' )"
DoCmd.RunSQL Sql
so I guess I need the after update code.
Can anyone help