Could anyone tell me why it will not close the form when clicking yes/ I have moved the DoCmd.Close around in all kinds of places and have also usedand still couldn't get it to closeCode:DoCmd.Close acForm, "frmRecieveOrd", acSaveYes
Code:Private Sub cmdSubmit_Click()DoCmd.Beep Dim intResponse As Integer intResponse = MsgBox("Do you want to update the quantities and exit?", vbQuestion + vbYesNo, "Save and Exit") If intResponse = vbYes Then Dim rsUpdate As DAO.Recordset Set rsUpdate = CurrentDb.OpenRecordset("Inventory", dbOpenDynaset) With rsUpdate .FindFirst "[Cookie] = 'Samoas'" .Edit 'Samoas ![InStock] = ![InStock] + intSamoas .Update .FindFirst "[Cookie] = 'Tagalongs' " .Edit 'Tagalongs ![InStock] = ![InStock] + intTagalongs .Update .FindFirst "[Cookie] = 'Thinmints'" .Edit 'Thinmints ![InStock] = ![InStock] + intThinmints .Update .FindFirst "[Cookie] = 'Do_Si_Dos'" .Edit 'DoSiDos ![InStock] = ![InStock] + intDoSiDos .Update .FindFirst "[Cookie] = 'Trefoils'" .Edit 'Trefoils ![InStock] = ![InStock] + intTrefoils .Update .FindFirst "[Cookie] = 'Cookie = 'SavannahSmiles'" .Edit 'savannahSmiles ![InStock] = ![InStock] + intSavannahSmiles .Update End With DoCmd.Close Set rsUpdate = Nothing End If 'User answered yes End Sub


POS form set up
Reply With Quote

