Code for clearing values from a table

G

Guest

I have a Tabular form called ShipForm based on a Table called Ship. The
Table and Form have three fields, PartID, ShipDate and PartsShipped.

I want to use this form to enter data for a particular day, and then after
entering the data run an Append Query to append the data to another table.
After the append query has run I would like to zero out the data in the field
called PartsShipped so that I can use the form to enter tomorrow's ship data.

I have placed a command button on the form to run the append query and that
works fine. What I am not sure about is the code that I could add on to the
Event Procedure so that the Command Button runs the append query and then
zeros out the values in the field PartsShipped.

Any help would be appreciated.

JoeP
 
J

John W. Vinson

I have a Tabular form called ShipForm based on a Table called Ship. The
Table and Form have three fields, PartID, ShipDate and PartsShipped.

I want to use this form to enter data for a particular day, and then after
entering the data run an Append Query to append the data to another table.
After the append query has run I would like to zero out the data in the field
called PartsShipped so that I can use the form to enter tomorrow's ship data.

I have placed a command button on the form to run the append query and that
works fine. What I am not sure about is the code that I could add on to the
Event Procedure so that the Command Button runs the append query and then
zeros out the values in the field PartsShipped.

Do you want to leave records in the (scratchpad) table Ship, just have them
with blank or zero content? Or do you want to delete all records in Ship,
leaving an empty table? I'd recommend the latter; to do so just run a query

DELETE * FROM Ship;

without criteria.

John W. Vinson [MVP]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top