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

gettin email address of a form from a query

Status
Not open for further replies.

JonEx

Programmer
Joined
Feb 26, 2004
Messages
21
Location
BB
hey im updating a current dbase and im having a problem right now i have a table for employess with there id's and email addresses , now i have a form with a combo box that shows these email addresses from the table

SELECT DISTINCT [tblEmp]. FROM tblEmp ORDER BY [tblEmp].[Email]

now if i didnt want the table instead i wanted a query as the row source .. say qrptGrAt that has the same information as the table "emp id and email addressses"

how would i go about that ?
is it even possible?
 
Hi

Just change the rowsource in the properties box of the combo, or have I missed the point?

Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
Hey Ken Reay,
well no you didnt entirely missed the point i am just wondering how would i go about it ?
for example the query name is qprtGrAt
so would it be

SELECT DISTINCT [qrptGrAt]. FROM qprtGrAt ORDER BY [qprtGrAt].[Email]

ive tried that but i get an exprs1 and then an error.
 
Hi

No, you just need to enter the query name in the rowsource property of the combo. You can enetr an SQL string here, or a table name or a (saved) query name, often refered to as a querydef

Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
hey ... so what would the SQL string look like ? i dont know much about SQL
 
Hi

SELECT DISTINCT [tblEmp]. FROM tblEmp ORDER BY [tblEmp].[Email]

is an SQL string

Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - [URL unfurl="true"]www.kenneth.reay.btinternet.co.uk[/URL]
UK
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top