tsql - MS-Access - how to trigger data insert before LostFocus event? -
I have a process that runs on to process some data on a stored SQL Server process server executes the process: The problem is that the value of the control ( How can I insert data before performing the stored procedure? to a control AfterUpdate
Event:
Private sub cmdDelCountry_AfterUpdate () dim strID string strID = cmdCommand as Me.ID with new ADODB.Command as strCase string strCase = 1 dim cmdCommand .acticConnection = CurrentProject.Connection .CommandType = adCmdStoredProc. CommandText = "uspSalesOrderHead_UPDATE" '@RowID .Parameters ("@RowID") Value = strID '@case .Parameters ("@ episode"). Value End Sub with = strCase .Execute end
ALTER process as uspSalesOrderHead_UPDATE (@RowID integer, @Case integer) that @Case = 1 / * Select country of delivery * / start / * order order Head table * / UPDATE dbo.tblSalesOrderHead SET dbo.tblSalesOrderHead.txtRegionCode = dbo. Tblsetingko Untrikdektshtrgiankde, Dboktblslesrderhedktshtkurrensikde = Dboktblsetingkauntrikdektshtkurrensikde, Dboktblslesrderhedktstlanguagekde = Dboktblsetingkauntrikdektstlanguagekde Dboktb Joined interior of lSalesOrderHead dbo.tblSalesOrderHead.txtDelCountry = dbo.tblSettingCountryCode.txtCountryCode and Dbo DboktblSettingCountryCode which .tblSalesOrderHead.ID = @RowID; / * Update / Update Order Line Table dbo.tblSalesOrderLine SET dbo.tblSalesOrderLine.txtRegionCode = dbo.tblSalesOrderHead.txtRegionCode, dbo.tblSalesOrderLine.txtCurrencyCode = dbo.tblSalesOrderHead.txtCurrencyCode FROM dbo.tblSalesOrderLineInnerJoin dbo.tblSalesOrderHead ON dbo. TblSalesOrderLine IntOrderNo = dbo.tblSalesOrderHead.ID and dbo.tblSalesOrderLine.intOrderNo = @RowID; End
cmdDelCountry
) is not included in the price table ( dbo.tblSalesOrderHead
) before it is Has been requested by the stored SQL process: Join interiors dbo.tblSettingCountryCode on dbo.tblSalesOrderHead.txtDelCountry
= dbo.tblSettingCountryCode.txtCountryCode
You can use (on the form)
< Code> If Me.Dirty is forced to save Me.Dirty = false
, but it can be better click on
Comments
Post a Comment