[AccessD] Getting info from a single record table

Mark A Matte markamatte at hotmail.com
Mon Apr 16 14:03:24 CDT 2007


John,

I do something similar.  I use a dlookup...and then give them a form with an 
unbound field and a button to change it.  On this form they enter the new 
(in your case) milage...and I use a SQL statement behing the button to write 
over my singe record.  This way the don't have the chance to enter 
additional records in the table.  The Dlookup is then used in all of my 
calculations.

Hope this helps...

Thanks,

Mark A. Matte


>From: "John Clark" <John.Clark at niagaracounty.com>
>Reply-To: Access Developers discussion and problem 
>solving<accessd at databaseadvisors.com>
>To: "'Access Developers discussion and problem 
>solving'"<accessd at databaseadvisors.com>
>Subject: [AccessD] Getting info from a single record table
>Date: Mon, 16 Apr 2007 14:44:49 -0400
>
>Years ago, I created a small program to track mileage of workers. There are 
>a bunch of things I'd have done differently, but they are very pleased 
>w/it. The bad thing though is that I couldn't figure out how to change the 
>mileage rate, on the fly, so I hard coded it. So, I have had to go in and 
>alter this rate, every quarter, if it changes.
>
>This wasn't too awfully bad, but they didn't notify me, the last couple of 
>times, until we were well into the quarter, and they had already keyed in a 
>bunch of the entries.  The calculation is done at the time of entry, so the 
>allowances were off, and I had to run a quick update query to fix the old 
>amounts. This is one of the things I would do differently, and I may change 
>it to compare the date w/a table of dates and rates, but this immediate 
>question will be relevant for that too.
>
>I would like to, for now at least, install a one-record table, to hold the 
>rate in it. I would have a very small form...basically a pop-up type 
>form...that would hold the rate. There would be no nav. buttons, so they 
>are stuck on the one record only. But...finally, we're at my question...how 
>do I reference this record?
>
>Example:
>
>Currently: [AmtOwed] = [Miles] * .485
>
>Would like: [AmtOwed] = [Miles] * [tblMileageRate]![CurRate]
>
>Make sense? I hope!
>
>John W. Clark
>
>
>
>--
>AccessD mailing list
>AccessD at databaseadvisors.com
>http://databaseadvisors.com/mailman/listinfo/accessd
>Website: http://www.databaseadvisors.com

_________________________________________________________________
Exercise your brain! Try Flexicon. 
http://games.msn.com/en/flexicon/default.htm?icid=flexicon_hmemailtaglineapril07




More information about the AccessD mailing list