Hello,
I have a couple of questions about Access SQL in Access 2016. I am working on creating a database in Access that will produce a random list of results based on a randomly assigned value. I am very new to SQL and am still learning the basics.
Here are the steps in my process:
1. qry1 - Selects all data in tbl1 and appends a random value to each record as Random in a new column.
2. qry2 - SQL query with the following syntax:SELECT TOP 4 [qry1].A, [qry1].B, [qry1].C
FROM [qry1]
ORDER BY [qry1].Random;
[qry1].A = short text
[qry1].B = short text
[qry1].C = number (only 1-5)
I am trying to include a second variable in the selection process ,[qry1].C, where a user can select a level of intensity (HIGH, MED, or LOW) from a combo box on a form with the following results:
HIGH will return a list of 4 random records, where SUM([qry1].C >15)
MED will return a list of 4 random records, where SUM( 15 >= [qry1].C > 12)
LOW will return a list of 4 random records, where SUM([qry1].C <= 12)
I am having a lot of trouble and would appreciate anyone's help with the SQL syntax, or any suggestions on other ways to set up my queries. I am also planning to incorporate other options on the form in the future that I will need to include in my macro.
If you need anymore information please let me know.
Thanks!