SendObject to pull email address from another table

J

JNariss

Hello,

I have a form in which users can open in order to edit a request that
has been previously entered. Because I don't want users to simply go
and edit any request they want, I have decided it would be best to put
a password protection on the edit request form. So now when my users
open it, they get a form which tells them they must enter a password or
request one if they don't have one.

When a user clicks the "Request Password" button a new form opens
asking them for the Request ID # they wish to edit, their Name, their
Email Address, and a Comment. They click "submit" and it gets sent to
the manager.

The manager receives an email populated with all the requestors
information and then goes into the Management Area of the database and
selects "Assign a password to edit a request". A form opens up where
they enter the same "Request ID", a Password, and then choose their
name from the combo-box list (Assigned By) and clicks submit.

Now.......here's the problem. How do I get the code behind the "Assign
a password to edit a request" form to go into tblRequestPassword and
pull the Email Address that matches the Request ID so the SendObjects'
strTo will email the password to the correct person who requested it?

Thanks,
Justine
 
R

Rob Oldfield

Use a dlookup. Something like:

mailaddress=dlookup("[Mail address field in
tblRequestPassword]","tblRequestPassword","RequestID="&me.requestID)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top