In this form, you can see the Customer control combobox with the control source of cust_nb. That cust_nb is a foreign key in the form's record source that is related to the Customer table, where cust_nb is the primary key. This table contains the customer's email. I would like for the email button next to the combobox to just launch an Outlook message with the customer's email address populated. I can think of ways to do this that involve an intermediary step - launching a form or query that find the related record and then emailing from there - but I'd like to bypass that and just launch directly into the email step from this form.
I imagine best route forward would be constructing a query in VBA on the button control that finds the related email and then launches the Email process with the email as an argument, but I've never written VBA that contains a SQL section. Could someone point me in the direction of how to run a SQL Select statement inside of a VBA sub to get that information to pass as an argument?