A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

show single entry table in a textbox field



 
 
Thread Tools Display Modes
  #1  
Old April 8th, 2008, 12:51 PM posted to microsoft.public.access.forms
The Dude
external usenet poster
 
Posts: 30
Default show single entry table in a textbox field

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
  #2  
Old April 8th, 2008, 02:13 PM posted to microsoft.public.access.forms
Brendan Reynolds
external usenet poster
 
Posts: 1,241
Default show single entry table in a textbox field

"The Dude" f_com2°AT°yahoo°DOT°fr wrote in message
...
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.

--
Brendan Reynolds

  #3  
Old April 9th, 2008, 09:07 AM posted to microsoft.public.access.forms
The Dude
external usenet poster
 
Posts: 30
Default show single entry table in a textbox field

Excellent
That's exactly what I was looking for!

Thanks Brendan

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 06:31 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.