I'm currently using cloud database, so to improve the speed I need to use a pass-through query from MS Access so that I can deal with the server directly. I'm trying to open the record source in VBA, that is where I'm getting it wrong. See below why the code is not changing the date.
Or to allow users to change the date I want to change from #02/11/2023# to Me.ShipDate
Code:
Dim db As DAO.Database
Dim strSQL As String
Set db = CurrentDb
strSQL = "SELECT * FROM [QryApproveSales] WHERE [tblCustomerInvoice].[InvoiceID] = " & [Forms]![frmCustomerInvoice]![CboDocument]
UPDATE tblCustomerInvoice SET tblCustomerInvoice.ShipDate = #02/11/2023#
DoCmd.SetWarnings False
DoCmd.OpenQuery "QryApproveSales"
Or to allow users to change the date I want to change from #02/11/2023# to Me.ShipDate