Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.
Dim db As DAO.Database Dim RcdSet As DAO.Recordset Dim sqlFP As String Set db = CurrentDb() sqlFP = "Select * From tblTranslationContractPurchases where trad_commandesID=" & Me![trad_commandesID] Set RcdSet = db.OpenRecordset(sqlFP, dbOpenDynaset, dbSeeChanges) Dim rs As DAO.Recordset Dim sqlOption As String sqlOption = "Select * From tbltrad_commandes_FPdetails where trad_commandesID=" & Me![trad_commandesID] & _ "AND OptionSelected=1" Set rs = db.OpenRecordset(sqlOption, dbOpenDynaset, dbSeeChanges) If RcdSet.RecordCount = 0 Then 'can't find proposal. need to do an append ElseIf RcdSet.RecordCount = 1 Then If rs.RecordCount = 0 Then MsgBox "You need to choose the number of words." ElseIf rs.RecordCount = 1 Then rs.MoveFirst DoCmd.SetWarnings False Dim strSQL As String strSQL = "Update tblTranslationContractPurchases set OrderDate = Now()," & _ here ====>>> "NegociatedRate = " & rs.NegociatedRate & _ ",ContractPrice = " & rs.ContractPrice & _ ",ContractQuantity = " & rs.ContractQuantity & _ ",FPEstimateStatus = 2 " & _ "where tblTranslationContractPurchases.trad_commandesID = " & Me.trad_commandesID DoCmd.RunSQL strSQL DoCmd.SetWarnings True Else MsgBox "You need to choose the number of words. Only one option at a time." End If End If RcdSet.Close Set RcdSet = Nothing
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.