Reuben Cummings
accessd at gfconsultants.com
Thu Nov 5 07:58:02 CST 2009
John, did you get the following request answered? Reuben Cummings GFC, LLC 812.523.1017 > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of John Clark > Sent: Wednesday, November 04, 2009 2:42 PM > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] Query question ... Finding the proper > rate/per date > > > I'm sorry to ask this...but I haven't written anything, aside > from one very miniscule little program, in about two years, > and apparently the magic is gone...I am lost. This code that > Stuart offered up is exactly what I was looking to do, > however, I'd like to do it from a form and what I thought I > needed to do is not working. > > I want to (A) have the rate come up, once a given date is > entered, and be there already when an old record is > accessed...I want to be able to say, "this was entered on > <date> and this was the rate at that time." And, (B) I want > it to multiply the number of miles w/this rate and present a > total. And (C) I want to do pick the going fee out of a > similar table and add this to the equation. I think if I can > do one of these, I can do them all. > > How can I grab this, when a new date is entered? > > Here is the code I am using, in the query, which works... > > SELECT TOP 1 tblMileageRate.datDate, tblMileageRate.curMRate > 'FROM tblMileageRate > 'WHERE (((tblMileageRate.datDate) < [Date Entered])) > 'ORDER BY tblMileageRate.datDate DESC; > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com >