Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

query to populate field problem

Status
Not open for further replies.

installer69

Programmer
Sep 18, 2004
35
GB
Sorry to be a pain, here is a sample from my table

ID Serial actionDate action location status
562 0001 22/09/2004 add stock warehouse good
563 0002 22/09/2004 add stock warehouse good
564 0003 22/09/2004 add stock warehouse good
565 0004 22/09/2004 add stock warehouse good
762 0001 23/09/2004 issue andy good
763 0002 23/09/2004 issue bob good
764 0004 23/09/2004 issue brian good
765 0003 23/09/2004 issue craig good
766 0001 23/09/2004 return warehouse good
767 0002 23/09/2004 return warehouse good
768 0003 23/09/2004 return warehouse faulty
 
Damn, hit submit instead of preview.

I have a data entry form that updates the above table if an item with a particular serial number is, say, returned. The serial number entry combobox data is limited by query to only items whose last location is 'warehouse'. (by maxActiondate) Another combo box looks up the last 'status' but because the query repopulates after entering the 'serial' to allow for the fact that the last serial is now no longer available to send back it sets the 'status' to the new value which is blank. Is there a way to write a query that will return the value before max of the 'actiondate field'?

Sorry if I've not made my question very clear but it's harder to explain it than write it!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top