Getting a value from a combo into an email

lemon_balm

Registered User.
Local time
Today, 02:20
Joined
Feb 7, 2006
Messages
65
Hi

I am trying to pass some details from a combo box into an email I am creating as part of a call logging system for my company.

I want to pass the text relating to the combo and not the actual bound column so I thought that an IF statement would be the way to go.

I have used message boxes to generate stop gap answers whilst running the code at testing stages (to stop my inbox getting too clogged up) and however I write the IF statement, I get the answer "Wrong"

Code:

If "Me!CallIssue" = "tables!tblissues.issueid" Then
MsgBox ("Correct")
'Issue = "tables!tblissues.Issue" <-----It won't pass this field
Else
MsgBox "Wrong"
'Issue = Me!CallIssue <-----Always passes the value from this field
End If

CallIssue is the join for issueid in tblissues. They are noth in number format.
Issue is a string variable

Has anyone got any ideas as I can pass the ID number for the field but not the text which is what I require

Regards

Jason
 
combo columns

Hi Jason,
I've always succeeded by refering to the columns of a combo. Say you have two columns but the first is hidden ( width = 0cm;2.5cm; ) containing ID then Names. To get the value from Names (column 2), use mycontrol = mycombo.column(1) or Dim myvariable, myvariable = mycombo.column(1). The second column is 1 because as always computers count from zero. You can have many columns in your combo and they can all be acccessed by counting from the left starting with 0.
But perhaps you already knew that...
Mike
 
Last edited:

Users who are viewing this thread

Back
Top Bottom