View Single Post
  #17  
Old October 13th, 2005, 02:12 AM
Chris W via AccessMonster.com
external usenet poster
 
Posts: n/a
Default

Ok this is what I implemented:


WHERE (transaction.Basket = -1 OR [forms]![multi query]![BasketChk] = 0) AND
((Cost.[Date of Research])=(select max([Date of Research]) from cost where
cost.[Plant and Machinery ID]=Transaction.[Plant and Machinery ID]) OR [forms]
![multi query]![NoMaxDateChk] = -1)

I am not quite sure why but it actually works perfectly, beautifully and
superbly

However, looking at this code do you think that I may experience any problems
in the future does it not contain something that it should.

Going on what you suggested their could be issues with incorrect dates being
imputed or not with in a range. The purpose of this feature is to pull the
most recent date from all dates attributable to the record on the transaction
table via the cost table, this could be over any range. The way I have got
around incorrect dates being entered is to have criteria on the entry of the
data, so I don’t really see this as a problem. Also null fields are not going
to be a problem because I have everything as a required field even is N/A is
entered.

Do you foresee any problems with this method, if so how do I get around
having null values in the table, I have all the query criteria fields set to
IS NULL, but that still only returns data when the filed contains data and
the IS NULL refers to the field through which the criteria is being entered
on the form.

Thank you so much for your help, mate it is good to have someone spend the
time, even if it does mean that it get to my boss a bit late


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...eries/200510/1