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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Set a default value for a textbox from a table value

Status
Not open for further replies.

Moss100

Technical User
Aug 10, 2004
584
GB
Hello,

I have a table called Settings.

The settings table has various fields (such as VAT rate).

The table only contains one row of records.

I want to use this table to set default values of textboxes on various forms throughout my database.

For example if the VAT rate changes I would just change it in the settings table and it would then update in the forms when they are used.

I need to undertand how to set the default value of a textbox to the value in my settings table.

So in this example....

I want to set the default value of the following textbox.

A textbox called txtVATRATE on a form called ORDERS

The value for this would come from a TABLE called Settings and the field in this table called DEFAULT_VAT_RATE


Many thanks Mark


 
in the default value property
=DLookUp("YourFieldName","YourTableName")
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top