show single entry table in a textbox field

  • Thread starter Thread starter The Dude
  • Start date Start date
T

The Dude

Hi guys,

I have a table that has only one line and one column (plus autonumber ID). I
know it sux but it's the only way I found to make a euro/dollar exchange rate
that user can change - I just need this one value.

I have managed to make a form to modify the rate (a simple SQL command), but
my problem is to show this value in another form, referring to another table.
Basically if I want to show it by an SQL command, I need a listbox - but
then I cannot change the display format. All I need is a simple text box but
then I can't add an SQL command.
I know the .clone command but if I'm correct it's just for forms, and I am
not sure I want to add a subform for such a small amount of information...

Anything I'm missing? lol
 
The Dude said:
Hi guys,

I have a table that has only one line and one column (plus autonumber ID).
I
know it sux but it's the only way I found to make a euro/dollar exchange
rate
that user can change - I just need this one value.

I have managed to make a form to modify the rate (a simple SQL command),
but
my problem is to show this value in another form, referring to another
table.
Basically if I want to show it by an SQL command, I need a listbox - but
then I cannot change the display format. All I need is a simple text box
but
then I can't add an SQL command.
I know the .clone command but if I'm correct it's just for forms, and I am
not sure I want to add a subform for such a small amount of information...

Anything I'm missing? lol


You could use the DLookup() function. Set the control source property of a
text box to an expression such as ...

=DLookup("YourFieldName", "YourTableName")

See "DLookup Method" in the help files for more information.
 
Back
Top