Hi, yes! That is what I'm trying to acheive... CostCodeStatus = "unused"... but how can I do this??? That is my problem. I've been working in SQL AND in the query design... and everything I am trying has some sort of error.
A CostCode is used with every record.. but is unique to a Job#. There...
SELECT [tbl MAIN].[ICI Job #], Min([tbl MAIN].[Cost Code]+1) AS [Last Cost Code Used]
FROM [tbl MAIN]
GROUP BY [tbl MAIN].[ICI Job #], [tbl MAIN].[EWA?]
HAVING ((([tbl MAIN].[ICI Job #])=[Enter Job #]) AND (([tbl MAIN].[EWA?])=No));
The above SQL is what I have now, and it will return the...
That would work, however, we only have a certain amount of codes that can be used... and in order to not run out, we have to fill in the gaps. The gaps created are not under our control. We have to put in these records sometimes as they come in. When most of the time we get to choose the cost...
Hi,
Any help on this? :o
The company I work for only has so many "cost codes" they can use on any particular "job #"... and therefore, I need to be able to provide the next "unused" cost code when a job # is entered. The gaps need to be filled so that we don't run out.
For Instance, if the...