I thought that I put this question up yesterday. I guess I did not. I am trying to debug the following section of code in frmEmail.
Code:
'-- Combo of name to send email to
StWho = Me.cboFullname
stWhere = "tblusers"
'--Looks up email address from Personnel Meeting Query
varTO = DLookup("stEmail", "", stWhere)
It is giving me at the first executable line that StWho = Peter Cushing@yahoo.com (a made up name and email address) now it is reading the wrong column in the
combo box. StWho should just be Peter Cushing only, without the email address. I was not sure yesterday why this was happening, but I think that I know now.
It is reading the wrong column here. For some reason it is reading the email address column and not the Fullname column. It is hard to explain since I thought I labeled it quite clearly.
The solution I believe is to make it read the correct column.
change the line:
StWho =Me.cboFullname
to
StWho =Me.cboFullname(1)
In the first case it is reading the first column and in the second it is reading the second column.
This seems to be the answer.
My question is doesn't
Me.cboFullname
mean anything. The cboFullname part should direct the user to read that column and not email address. It is just place holder it seems.
I have attached a file and the *.png screenshot of what I am speaking about.
Any help appreciated. Thanks in advance.
Respectfully,
Lou Reed