Thanks John
I will checkout updateable and here is my sql query:
SELECT BOOKS.Number, BOOKS.[Number 2], BOOKS.Date, BOOKS.Forename,
BOOKS.Surname, BOOKS.Unit, BOOKS.Returned, BOOKS.Archived
FROM BOOKS
WHERE (((BOOKS.Number)=Left([Enter sheet no:],5) & IIf(Val(Right([Enter
sheet no:],2)>50),"51","01")))
GROUP BY BOOKS.Number, BOOKS.[Number 2], BOOKS.Date, BOOKS.Forename,
BOOKS.Surname, BOOKS.Unit, BOOKS.Returned, BOOKS.Archived
ORDER BY BOOKS.Number DESC;
PMFJI, but there are several problems here, as I'm sure John will
also be quick to point out:
(1) "Date" is a reserved word in Access. If it is not conveniently
possible to rename this field/column, you should enclose it in square
brackets, i.e.:
BOOKS.[Date]
The best thing would be to rename it ASAP because otherwise, you will
be constantly having trouble with such names;
(2) You have a "GROUP BY" clause in your query, yet there are no
aggregations (i.e. SUM, AVG, MAX etc.) in the SELECT list. This by
itself would make your query non-updatable. Solution: just get rid of
everything from GROUP BY... up to ORDER BY (delete the keywords
"GROUP BY", but keep "ORDER BY" and everything after that);
(3) You have expressions like this:
(BOOKS.Number)=Left([Enter sheet no:],5) ...
which look like there should be a PARAMETERS clause at the very top
of your SQL statement, yet there is none. Where does "[Enter sheet
no:]" come from??