G
Guest
i have an Access2003 database with a main form that has several sub forms.
Part of my code writes data to the main form when it is about to close.
Below is my section of code that is causing me problems. When i requery my
form it somehow creates a new record. So all the data on my form is lost and
a blank record appears. i need to requery my form to prevent the save dialog
box from appearing.
Forms![frmWorkOrders]![frmWorkOrdersQuote].Form![QuotePrintedDate].Value =
Date ' Creates Date In Date Printed Field When Quote Was Printed.
MsgBox "4"
Forms!frmWorkOrders.Requery
MsgBox "5"
Forms!frmWorkOrders.Combo73.Value = "Quote Sent" ' Once Quote Is
Printed,Status Is Changed To Quote Sent.
Forms!frmWorkOrders.StatusDate.Value = Now ' Change Status Date.
DoCmd.Close acForm, "frmWorkOrders", acSaveYes ' Close WO Form.
Any ideas why it is creating a new record on requery?
Part of my code writes data to the main form when it is about to close.
Below is my section of code that is causing me problems. When i requery my
form it somehow creates a new record. So all the data on my form is lost and
a blank record appears. i need to requery my form to prevent the save dialog
box from appearing.
Forms![frmWorkOrders]![frmWorkOrdersQuote].Form![QuotePrintedDate].Value =
Date ' Creates Date In Date Printed Field When Quote Was Printed.
MsgBox "4"
Forms!frmWorkOrders.Requery
MsgBox "5"
Forms!frmWorkOrders.Combo73.Value = "Quote Sent" ' Once Quote Is
Printed,Status Is Changed To Quote Sent.
Forms!frmWorkOrders.StatusDate.Value = Now ' Change Status Date.
DoCmd.Close acForm, "frmWorkOrders", acSaveYes ' Close WO Form.
Any ideas why it is creating a new record on requery?