Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Sub UpdateOrderIntoAccessCMD()
- Dim uporderid As Long
- 'Dim upcustid As Long
- 'Dim upcustname As String
- Dim updeliverydate As Date
- Dim uporderdate As Date
- Dim upcustref As String
- 'Dim updeladd As String
- 'Dim upcustadd As Integer
- Dim updeladd1 As String
- Dim updeladd2 As String
- Dim updeladd3 As String
- Dim updeladd4 As String
- Dim updelpostcode As String
- Dim upspecialdel As String
- Dim updriver As String
- Dim upinstaller As String
- Dim upinstalldate As Date
- Dim upnotes As String
- uporderid = UpdateOrder.TextSGGOrderNo.Value
- 'upcustid = UpdateOrder.TextCustID.Value
- 'upcustname = UpdateOrder.ComboBoxCustName.Value
- updeliverydate = UpdateOrder.DPdeliverydate.Value
- uporderdate = UpdateOrder.DPorderdate.Value
- upcustref = UpdateOrder.TextCustOrderNo.Value
- updeladd1 = UpdateOrder.Textdeladd1.Value
- updeladd2 = UpdateOrder.Textdeladd2.Value
- updeladd3 = UpdateOrder.Textdeladd3.Value
- updeladd4 = UpdateOrder.Textdeladd4.Value
- updelpostcode = UpdateOrder.Textdelpostcode.Value
- upspecialdel = UpdateOrder.Textspecialdel.Value
- updriver = UpdateOrder.ComboBoxdriver.Value
- upinstaller = UpdateOrder.ComboBoxInstaller.Value
- upinstalldate = UpdateOrder.DPInstallDate.Value
- upnotes = UpdateOrder.TextNotes.Value
- Dim dbs As Database
- Set dbs = OpenDatabase("" & ThisWorkbook.path & "\Customer Database.accdb")
- ' dbs.Execute "UPDATE ORDERHEADER SET deldate='" & updeliverydate & "', date='" & uporderdate & "', custref='" & upcustref & "', address1='" & updeladd1 & "', address2='" & updeladd2 & "', address3='" & updeladd3 & "', address4='" & updeladd4 & "', postcode='" & updelpostcode & "', specialdel='" & upspecialdel & "', driver='" & updriver & "', installer='" & upinstaller & "', installdate='" & upinstalldate & "', notes='" & upnotes & "' WHERE ID=" & uporderid & ""
- dbs.Execute "UPDATE ORDERHEADER SET" & _
- " deldate='" & updeliverydate & "', date='" & uporderdate & "', custref='" & upcustref & "'," & _
- " address1='" & updeladd1 & "', address2='" & updeladd2 & "', address3='" & updeladd3 & "', address4='" & updeladd4 & "'," & _
- " postcode='" & updelpostcode & "', specialdel='" & upspecialdel & "', driver='" & updriver & "', installer='" & upinstaller & "', installdate='" & upinstalldate & "', notes='" & upnotes & "'" & _
- " WHERE ID=" & uporderid & ""
- dbs.Close
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement