Emailing contents of Combo Box

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi all
I have an application where I email a person data from a form. On that form
is a combo box which shows the second field of a table ( field 1 is the ID
and field 2 is a name). When I include the contents of the combobox in the
mail I always get the first field. Is there a way to select the second field
from a combobox?
If this does not make sense please let me know and I will try to explain it
better.

Thanks
 
I have also tried setting up a variable as follows to use on the email but
have done something wrong
Dim company As String
Company = Me!Contract![Customer Id].[Column](1)

Where the Contract is the form, Customer ID is the value from the comboxbox
 
You're on the right track. The basic synthax is:

Forms![FormName].Form.ControlName.Column(Index)
or
Forms![FormName]![SubFormName].Form.ControlName.Column(Index)

So in your case try.

Me!Contract.Form.[Customer Id].Column(1)

This may or may not work. If it doesn't answer the following. What is
Contract, a subform? Customer ID is the name of the combo box control I
assume?!
--
Hope this helps,

Daniel P





Murray said:
I have also tried setting up a variable as follows to use on the email but
have done something wrong
Dim company As String
Company = Me!Contract![Customer Id].[Column](1)

Where the Contract is the form, Customer ID is the value from the comboxbox

Murray said:
Hi all
I have an application where I email a person data from a form. On that form
is a combo box which shows the second field of a table ( field 1 is the ID
and field 2 is a name). When I include the contents of the combobox in the
mail I always get the first field. Is there a way to select the second field
from a combobox?
If this does not make sense please let me know and I will try to explain it
better.

Thanks
 
Back
Top