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
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