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!

Output of a Query to table

Status
Not open for further replies.

MrMcFestoe

Technical User
Apr 6, 2003
119
GB
I have a table called CUSTOMERS with a field called LAST SERVICE VISIT, i have a query called LAST SERVICE VISIT which returns the MaxOfLAST SERVICE VISIT (the newest date) but i want it to fill in the LAST SERVICE VISIT in the CUSTOMERS TABLE.

Cant get it to do it why?

There is more, but i have been trying for 4months now on this little bit, and the LOOKUP does not work with dates. WHY

Access 2000
 
What is the source of queryLAST SERVICE VISIT.MaxOfLAST SERVICE VISIT? If it is your tblCustomers, why do you need MaxOf?
You may have a structural db problem here, but that's just my guess without more details.

You're not alone,

TomCologne
 
Tom,

Cheers for the reply,

Soruce of LAST SERVICE VISIT comes from a table called SERVICE HISTORY which keeps all the service dates, the query groups and gets the MaxOfLAST SERVICE VISIT if i run the query it works fine and returns the last date for each customer, i need it to update the field LAST SERVICE VISIT in the CUSTOMERS table so it can be dispalyed on the customers form.

Is that what you mean?
 
Mac,

Have a little patience, IE6 keeps crashing on me, I'll have to fix that first.

Tom
 
Mac,

Somehow duplicating data that is already stored and identified in another table makes me feel a little uncomfortable, but there's certainly a reason for your doing it.
Try something like the following in the 'Update to' field in a new Update query for your (COPY!!)Customers table

DMAX(["[LAST SERVICE VISIT]", "SERVICE HISTORY", "[CustomerID]=" & [CustomerID])

Tip: Avoid spaces in field names; one potential error source less.

You're not alone,

TomCologne
 
Tom

Will give that a try and let you know

Thanks

Oh no doubt i probaly have nowhere your exp in access, so if i can help you out in anyway let me know.

Colin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top