and other data for the specifics about the email to be sent. I do mine this way to be able to select multiple records in the subform for multi-addressee emails
Main Topics
Browse All TopicsHey! Another easy one!
I've got a main form, which holds my data. All of this data is stored in tblData
I have another table which has possible e-mails, called tblEmails
In my main form, users will be entering data. However, I want them to be able to go into the subform, select a specific e-mail, and then click "send". The e-mail would then be generated based on the template selected in the subform, but filing in data from the main form.
I want to know how to reference data from the main form in the subform, and vice versa...
IE, if I have a field called "Reference_Number" in the main form, how can a vba program get the value in the subform?
I tried using Me.Parent.Reference_Number
Any suggestions?
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Hmm.. I'm not quite following.... I'll try to explain a bit more...
Each of these records in the main form deals with a customer's request.
The user here wants to be able to select(from a combo box) one of many different e-mails. EG:
More_Data: More information is required to process your request.
Response: We have received your request and will reply within 1 business day.
etc.
Would there be a way to have a combo box on the main form with "More_Data", "Response", etc. and then be able to populate a text box with the email text? (Then my send button could fill in the customer specific data)
A combo box with identifier for the 'Email Template' you are sending should do it. A subform may be overkill for this IF the item you are identifying is simply a way to say "send email template A" vs "B". All the rest of the data being on your main for the combobox might be a much simpler way to do this.
Make the tbl_emails.text a 0 width column of the combobox and reference it as
Me("cboEmailTemplates").co
(cbo's are zero based column counts)
You can have a larger text box to display the selected 'template text' somewhere else on the form with a control source of
=forms!thisform.cbocboEmai
to display 'the bigger picture'
Business Accounts
Answer for Membership
by: jadedataPosted on 2003-08-22 at 07:21:08ID: 9203561
Try putting your Send button on the main form and reference the subform data from the current record for the email address.