Full Version: display details from combo box?
UtterAccess Discussion Forums > Microsoft® Access > Access Forms
bansi
hey guys

this is what im trying to do.. i have a combo box that lists the names of suppliers (the unique supplier ID is hidden in this combo box). what im trying to do is when a supplier is selected, i want the email address that is stored for that supllier (in tblSupplierDetails) to appear on my form. can this be done?

also, ideally the email address needs to be displayed as a hyperlink, so that when the email address is clicked the email client opens up... is this part possible? the email client is ms outlook...


thanks in advance
HiTechCoach
Yes, it is possible to do.

If you will add the email address field ad a column to the combo box, then you can easily display it.

If the Email address is in column 3 then use this as the control source for a text box:

=YourComboBixName.Column(2)

Note: when you reference a column, you start counting with 0.

To get the email address to open, you could use a command button with:

Application.FollowHyperlink YourComboBixName.Column(2)

You could also set the email address in the hyperlinkAddress for a label that can be clicked.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.