In the two db's that I have attached, one works (the smaller db) and one I am working on db (the larger db)
When I am working on the correct functioning db, I come across the lines of code:
Code:
'-- Combo of names to assign ticket to
stWho = Me.cboAssignee
stWhere = "tblUsers.strUserID = " & "'" & stWho & "'"
'-- Looks up email address from TblUsers
varTo = DLookup("[strEMail]", "tblUsers", stWhere)
Now I will address a couple of things. First, the record source for the form frmEmail is a query qryMeeting_Personnel. So I guess that I will have to substitute when I make out the
stWhere statement on the larger db and put it in quotes. Again there is no table, my record source is qryMeeting_Personel. Now I must also build the varTo statement. So I believe this it should be
varTo = DLookup("email address","qryMeeting_Personnel',stWhere)
provided StWhere was assumed previously defined correctly.
The files of the two dbs one complete and working; that one is a work in progress, are attached.
Please tell me if I did this correctly.