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

Simple select from table

Status
Not open for further replies.

jamesmills

Technical User
Jul 30, 2003
43
0
0
GB
Hey people

I have the SQL code i need to select a falue from a table but i am unsure how to run it

for example
SELECT serverIP FROM tblServerList WHERE serverType = currentServerType AND serverName = currentServerNumber

i need the string serverIP to have the value that this will get from the table
i understand it to have somthign to do with recordset?

thanks in advance
 
If you only need one value on one table, you can use DLOOKUP function :

dim serverIP as string
serverIP=Dlookup("serverIP","tblServerList", _
"serverType = " & currentServer & " and serverName=" currentServerNumber)

That's all

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top