I searched and read everything found regarding TopValues- since those answers don't fit exactly what I am trying to do here is another post 
I have a query that selects records for a table based on a users input on a form-
They would like to be able to input the TopValues number [set to 100 for this query] from that form, also.
The code for the query is below-
*******************************************
INSERT INTO tblGeneratedRandomRecords ( recid, ACCOUNT_ID, UNIFORM_BUSINESS_ID, ACCT_ACTV_DATE, REGION_NUMBER, CountOfRISK_MAIN_SUB, SumOfPREMIUM_ASSESSED, SumOfTOTAL_UNITS, YEAR_QRTR, ACCT_STATUS_CODE, [Total DrvdFTE], FIELD_AUDIT_FLG, LAST_FIELD_AUDIT_DATE, IN_COLLECTION_FLG, OUT_COLLECTION_DATE, RandNumGen, NAICSCode, NAICSDesc )
SELECT TOP 100 tblRollUpPayRoll.recid, tblRollUpPayRoll.ACCOUNT_ID, tblRollUpPayRoll.UNIFORM_BUSINESS_ID, tblRollUpPayRoll.ACCT_ACTV_DATE, tblRollUpPayRoll.REGION_NUMBER, tblRollUpPayRoll.CountOfRISK_MAIN_SUB, tblRollUpPayRoll.SumOfPREMIUM_ASSESSED, tblRollUpPayRoll.SumOfTOTAL_UNITS, tblRollUpPayRoll.YEAR_QRTR, tblRollUpPayRoll.ACCT_STATUS_CODE, tblRollUpPayRoll.[Total DrvdFTE], tblRollUpPayRoll.FIELD_AUDIT_FLG, tblRollUpPayRoll.LAST_FIELD_AUDIT_DATE, tblRollUpPayRoll.IN_COLLECTION_FLG, tblRollUpPayRoll.OUT_COLLECTION_DATE, acbgetrandom([recid]) AS RandNumGen, tblRollUpPayRoll.NAICS_Code, tblRollUpPayRoll.NAICSDesc
FROM tblRollUpPayRoll
ORDER BY acbgetrandom([recid]);
****************************************
Any help is appreciated!
I have a query that selects records for a table based on a users input on a form-
They would like to be able to input the TopValues number [set to 100 for this query] from that form, also.
The code for the query is below-
*******************************************
INSERT INTO tblGeneratedRandomRecords ( recid, ACCOUNT_ID, UNIFORM_BUSINESS_ID, ACCT_ACTV_DATE, REGION_NUMBER, CountOfRISK_MAIN_SUB, SumOfPREMIUM_ASSESSED, SumOfTOTAL_UNITS, YEAR_QRTR, ACCT_STATUS_CODE, [Total DrvdFTE], FIELD_AUDIT_FLG, LAST_FIELD_AUDIT_DATE, IN_COLLECTION_FLG, OUT_COLLECTION_DATE, RandNumGen, NAICSCode, NAICSDesc )
SELECT TOP 100 tblRollUpPayRoll.recid, tblRollUpPayRoll.ACCOUNT_ID, tblRollUpPayRoll.UNIFORM_BUSINESS_ID, tblRollUpPayRoll.ACCT_ACTV_DATE, tblRollUpPayRoll.REGION_NUMBER, tblRollUpPayRoll.CountOfRISK_MAIN_SUB, tblRollUpPayRoll.SumOfPREMIUM_ASSESSED, tblRollUpPayRoll.SumOfTOTAL_UNITS, tblRollUpPayRoll.YEAR_QRTR, tblRollUpPayRoll.ACCT_STATUS_CODE, tblRollUpPayRoll.[Total DrvdFTE], tblRollUpPayRoll.FIELD_AUDIT_FLG, tblRollUpPayRoll.LAST_FIELD_AUDIT_DATE, tblRollUpPayRoll.IN_COLLECTION_FLG, tblRollUpPayRoll.OUT_COLLECTION_DATE, acbgetrandom([recid]) AS RandNumGen, tblRollUpPayRoll.NAICS_Code, tblRollUpPayRoll.NAICSDesc
FROM tblRollUpPayRoll
ORDER BY acbgetrandom([recid]);
****************************************
Any help is appreciated!