Erase Command for Form and Sub Form

Scrone18

New member
Local time
Tomorrow, 02:41
Joined
Oct 29, 2008
Messages
6
Does anyone know of any coding that will enable me to erase a form and a sub-form at the same time while keeping let's say the Order Date and Invoice Number the same....Or...have them revert back to their defaults. Currently I have the below coding:

Private Sub ClearAll_Click()

Me.CustomerID = Null
Me.Customer = Null
Me.Employee = Null
Me.ShippingMethod = Null
Me.Comment = Null
Me.PaymentReceived = False
Me.Date_Received.Visible = False
Me.ShippingandHandling = Null

End Sub

My sub-form's name is "Order Details Extended Form" with "Product", "UnitPrice", "Quantity", "Discount", "Credit", "ExtendedPrice", "Date", "WorkDescription", and "AccountingID" as control fields. Product, Discount, and credit are combo boxes. UnitPrice is a lookup via VBA Script as well As AccountingID.

Thanks,

Tony
 
I suggest next:
Use UNDO icon, or DELETE RECORD icon.
 
Although that is the easy way to clear the form, I need something that is a little more functional for other staff. Their will be many more controls added to the form and It will be time consuming to undo every control. I need something a little more user friendly...One button..erase form. I want to avoid deleting the entire record to keep the sequential numbers. We do not want any gaps.:rolleyes:
 

Users who are viewing this thread

Back
Top Bottom