Find Settings

SteveE

Registered User.
Local time
Today, 23:40
Joined
Dec 6, 2002
Messages
221
I need to create default setting in my mde database such as Exchange rate and Vat rate etc. at present I have fields on my form which default to my settings, but when things change it means creating a new mde each time. I have created a settings table with a single record, with each setting required as a field. My forms will then take the setting from this table which can be updated through a normal input form, or directly into the table.
(I think this is how it should be done but I am very willing to take advise)

My problem is how to get the [exchrate] field from the table into my form so calculations can be taken from its value, I can pick it by a Select Distinct from the table but whats the correct way of doing this?

thanks in advance
 
I assume you store the vat and exchange rate along with the rest of the record details, so just use DLookup on the single record table to get the default values
 
Thank Rich for your speedy reply, my problem is that I not sure just how to apply Dlookup where to use it etc.

Steve
 
=DLookUp("VatRate","MisInfo") as the default value for a textbox on a form, I usually hide this textbox, you can also use the DLookUp in vba. MisInfo is the table name in this case
 
Thanks for that Rich, I can now get the correct value from the table into my new text box, the only problem I now have is how to pass the value into a field on my form which performs the calculations etc. this field is part of the main table which also stores the exch rate in the record for the date in question
I think I need something like [ExchRate]=MyForm [exch] but I keep getting errors, where should I put this ?

Steve
 

Users who are viewing this thread

Back
Top Bottom