There is no equivalent NEWID() function in MS Access. If you want to create global unique identifier, you need to create
VBA function[
^].
Another difference: How to MS Access proceed with
parameters[
^]. Parameters are used
to make a query ask user for input[
^]
Finally, query should looks like:
PARAMETERS fxTestCode INT
DELETE FROM tblReportTempData;
INSERT INTO tblReportTempData (fxQuestionnaire,fxNewID)
SELECT fxQuestionnaire, GUID() AS fxNewID
FROM tblTestPaper
WHERE fxTestCode = [fxTestCode]
ORDER BY GUID();
SELECT *
FROM tblReportTempData
ORDER BY fxNewID;
Another