Solve your biggest tech problems alongside global tech experts with 1:1 help.
SELECT Denomination.DenominationID, Denomination.Denomination, Denomination.DenominationMultiple, Denomination.DenominationTypeID, Denomination.Active, DCount("DenominationID","qry_Denomination_Currency_Active","DenominationID <= " & [DenominationID]) AS CurrencyActiveDenominationSeq FROM Denomination WHERE (((Denomination.DenominationTypeID)=2) AND ((Denomination.Active)=-1));
Private Sub GenerateLVLMachineLines2(IsMachinePull As Boolean) Dim bytCounter As Byte, lngMyRptgSeqID As Long, lngMyShiftRptgLVLCtlID As Long, i As Integer, z As Integer Dim strSQL As String lngMyRptgSeqID = GetMyShiftSeqID() lngMyShiftRptgLVLCtlID = GetMyShiftRptgLVLCtlID() i = 1 ' This counter is for Inserting Active Currency Seq to Machine Pull tbl z = DMax("ShiftRptgMachPullCountCtlID", "ShiftReportingMachinePullCountCtl", "ShiftRptgMachPullCountCtlID") Do Until bytCounter = Me.txtNbrMachines CurrentDb.Execute "INSERT INTO ShiftReportingLVL (ShiftRptgLVLCtlID, LVLPositionNbr, RptgSeqID, MachinePulled) VALUES (" & lngMyShiftRptgLVLCtlID & "," & bytCounter + 1 & "," & lngMyRptgSeqID & "," & True & ")", dbFailOnError bytCounter = bytCounter + 1 Loop Do Until i = Forms![frm_DataReporting]![LVLReportingTypeSelect]![txtCntActiveCurrencyDenominations] strSQL = "INSERT INTO ShiftReportingMachinePullDetails (ShiftRptgMachPullCountCtlID, DenominationID) SELECT " & z & ", DenominationID FROM [qry_Denomination_Currency_Active] WHERE [CurrencyActiveDenominationSeq]= " & i CurrentDb.Execute strSQL, dbFailOnError i = i + 1 Loop End Sub
Join the community of 500,000 technology professionals and ask your questions.