I have a problem with changing / updating a record in the table from un an unbound form.
Heres what I have.
A form whereby invoice details are entered, upon clicking the command button, the data is sent to the report and a new record in the INVOICES table is created. This works fine.
What I need to do now is to CHANGE the CUSTOMERTYPE field in the CUSTOMERS table from PROSPECT to CUSTOMER. The default for the field is set to PROSPECT when entering new records.
I am updating the Invoice table with the following code:
How can I update the CUSTOMERTYPE field of the CUSTOMERS Table with the new data?
Heres what I have.
A form whereby invoice details are entered, upon clicking the command button, the data is sent to the report and a new record in the INVOICES table is created. This works fine.
What I need to do now is to CHANGE the CUSTOMERTYPE field in the CUSTOMERS table from PROSPECT to CUSTOMER. The default for the field is set to PROSPECT when entering new records.
I am updating the Invoice table with the following code:
Code:
Public Sub AddInvoice()
Dim rst As DAO.Recordset
Set rst = CurrentDb.OpenRecordset("tbl_Invoices", dbOpenDynaset)
With rst
.AddNew
rst!CustomerID = CustomerID
rst!Date = Date
rst!Description = Description
rst!Amount = Amount
rst!InvoiceNumber = InvoiceNo
rst!CompanyName = CompanyName
.Update
End With
End Sub
How can I update the CUSTOMERTYPE field of the CUSTOMERS Table with the new data?
Last edited: