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

How can I get a value from a table into a variable

Status
Not open for further replies.

SashaBuilder3

Programmer
Jan 13, 2002
131
CA
Hi everybody,


I know how to get a value from a table through opening a recordset, but I am wondering if there is another way, something like this:

My_var = SELECT column1 from some_table where column2='ABC'

providing that this SELECT returns a single value.


???????

Thanks,

Alexandre
 
I'm not able to comment on using a query like that, but here's an idea... check into the dlookup function... that might help you...

--James
junior1544@jmjpc.net
Life is change. To deny change is to deny life.
 
On 10/15/02 I asked a question about DLookup as I was having problems using this function.

In responding to my question Paul Bricker explained how to use a combo box query for the purpose of populating form controls based upon related tables. You may find this to be useful as well.
 
xqzme,


Thanks for the tip, I should definitely have this in my arsenal. As to the DLookup I had no problem to run it.


Alexandre
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top