I am havingn issue with QUeries....I am doing UNION query.....
I have a SQL query that UNIONS a bunch of records to return just those that meet some criteria. Using this query gets the records I want but its a select query and thus the results are NOT EDITABLE.
If I do a normal query through the wizard I have to set up fields for that will return the values, thus returning extra fields etc...
HOW CAN I modify the below query (truncated for example) to allow the user to still edit if I point a form to this query?
SELECT "Art 1" AS Expr1, tbl_V4_Details.StudentID, tbl_V4_Details.StudentName, tbl_V4_Details.LessonNum, tbl_V4_Details.Master, tbl_V4_Details.Calendar, tbl_V4_Details.Notes
FROM tbl_V4_Details
WHERE (((tbl_V4_Details.StudentID) = 1) AND ((tbl_V4_Details.Calendar) =True) AND ((tbl_V4_Details.LessonNum) = 1))
ORDER BY tbl_V4_Details.Presented
UNION
SELECT "Geography" AS Expr1, tbl_V4_Details.StudentID, tbl_V4_Details.StudentName, tbl_V4_Details.LessonNum, tbl_V4_Details.Master, tbl_V4_Details.Calendar, tbl_V4_Details.Notes
FROM tbl_V4_Details
WHERE (((tbl_V4_Details.StudentID) = 1) AND ((tbl_V4_Details.Calendar) =True) AND ((tbl_V4_Details.LessonNum) = 2))
ORDER BY tbl_V4_Details.Presented;
If I do this I can update the values
SELECT tbl_V4_Details.StudentID, tbl_V4_Details.StudentName, tbl_V4_Details.LessonNum, tbl_V4_Details.LessonSubject, tbl_V4_Details.LessonName, tbl_V4_Details.LessonDescription, tbl_V4_Details.Calendar
FROM tbl_V4_Details
WHERE (((tbl_V4_Details.LessonSubject)="Art") AND ((tbl_V4_Details.Calendar)=True))
If I do this it does NOT allow me too...Seems the SELECT and UNION block this
SELECT tbl_V4_Details.StudentID, tbl_V4_Details.StudentName, tbl_V4_Details.LessonNum, tbl_V4_Details.LessonSubject, tbl_V4_Details.LessonName, tbl_V4_Details.LessonDescription, tbl_V4_Details.Calendar
FROM tbl_V4_Details
WHERE (((tbl_V4_Details.LessonSubject)="Art") AND ((tbl_V4_Details.Calendar)=True))
UNION SELECT tbl_V4_Details.StudentID, tbl_V4_Details.StudentName, tbl_V4_Details.LessonNum, tbl_V4_Details.LessonSubject, tbl_V4_Details.LessonName, tbl_V4_Details.LessonDescription, tbl_V4_Details.Calendar
FROM tbl_V4_Details
WHERE (((tbl_V4_Details.LessonSubject)="Geography") AND ((tbl_V4_Details.Calendar)=True));
How can I UNION a bunch of querys together to get one list of values meetign specific qriteria.
Basically I have one table with a bunch of records...I want only specifc records...the only way I found out how to do thsi was teh UNION query...
ANY HELP woudl be greatly apprecaited.....
Thanks