Using Access 2000
Here is a piece of code that is behind a "Save" button on a form.
All fields are appended except for the field in bold print, ProjectNbr.
They are the same data type (text). The value for this field is calculated from Year(Date) & "-" & CustomerID & "-" & ProjectID
Any reason this field shouldn't plug in?
Tom
Here is a piece of code that is behind a "Save" button on a form.
Code:
Dim sql As String
Dim sql2 As String
sql = "INSERT INTO tblProjects ( CustomerID, CompletionDateActual, [b]ProjectNbr[/b], Description, Deposit, Accepted, PSTExempt, GSTExempt ) " _
& "SELECT tblInvoice.CustomerID, tblInvoice.CompletionDateActual, [b]tblInvoice.ProjectNbr[/b], tblInvoice.Description, tblInvoice.Deposit, tblInvoice.Accepted, tblInvoice.PSTExempt, tblInvoice.GSTExempt " _
& "FROM tblInvoice " _
& "WHERE tblInvoice.ProjectID Not In (Select ProjectID From tblProjects);"
DoCmd.RunSQL sql
All fields are appended except for the field in bold print, ProjectNbr.
They are the same data type (text). The value for this field is calculated from Year(Date) & "-" & CustomerID & "-" & ProjectID
Any reason this field shouldn't plug in?
Tom