
October 4th, 2003, 05:27 PM
|
|
Junior Member
|
|
Join Date: Oct 2003
Location: Winnipeg,Manitoba /Canada
Posts: 1
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
Access Query
I am looking for an answer about a MS Access 2002 query. The query looks into a table called Blanket PO Table that contains a field [PONUM] . The PO field contains various PO numbers which are text. The format on the PO number is B00000. Most of the PO's start with a B. I have set up a query that selects the last B po number in the table and adds 1 to create the NextPONum. My select statement in my query is written as follows.
SELECT Max("B" & Format(Right(Trim([PONUM]),5)+1,"00000")) AS NextPoNum
FROM [Blanket PO Table]
GROUP BY Left([PONUM],1)
HAVING (((Left([PONUM],1))="B"));
The statement works quite well in Access 2000 but Access 2002 has a problem with the format and comes back with an error "Undefined function 'Format' in expression. Does anyone know what the problem is?
Bob
|