With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.
Private Sub Command34_Click() 'DoCmd.SetWarnings False If Not (Recordset.EOF And Recordset.BOF) Then Recordset.MoveFirst 'Good habit Do Until Recordset.EOF = True DoCmd.OpenQuery "qryStockTransferDeductFrom" ' Deducts the quantity from QtyLoc in the ProdLocations Table. If DCount("*", "[ProdLocations]", "[ProductID] =" & Me.ProductID & " AND [LocID] =" & Me.LocID) > 0 Then DoCmd.OpenQuery "qryStockTransferAddTo" 'Updates QtyLoc in the ProdLocations Table If there is one already existing from the Dcount. Else DoCmd.OpenQuery "qryStockTransferAddAppend" 'Adds a record to ProdLocations Table if one doesn't already exist from the Dcount. 'Move to the next record. Don't ever forget to do this. Recordset.MoveNext Loop Else MsgBox "There are no records in the recordset." End If End If MsgBox "Finished looping through records." 'Recordset.Close 'Close the recordset 'Set Recordset = Nothing 'Clean up 'DoCmd.SetWarnings True End Sub
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.