Forms

D-Fresh

Registered User.
Local time
Today, 08:38
Joined
Jun 6, 2000
Messages
225
Ok, I have a big form where data is inputted. I have two basic questions here.

First is, I have an E-mail function attached to a submit button, that whenever you hit the button, it sends an E-Mail to a certain person. I have a field on the source table that has record #, and it is Autonumber. I have

Set MyDB = CurrentDB()
Set MyRecs = MyDB.OpenRecordset
("Adjustment Correction Table")

The field name in Adjustmen Correction Table is [Record #], how would I refer to the current record I'm working on as a variable.

The Second is this... I also have a check box, which sends a different E-mail if clicked. I have the function set to On Get Focus, which is what I assumed to be if the check box was clicked True. However, if I check it True, or Uncheck it false, it still sends the E-Mail. How could I get it to just send the E-Mail when I check the box true, not when it's unchecked false.

Thanks in Advance...

Doug
 
Maybe I'm misunderstanding the first one, but if the field is in the source table for our form, it seems you could just use
me.[Record #]

2nd:
I would use the After Update event to avoid firing an email if someone tabs to the control. Or, I would put it in your submit button, so the two emails are submitted only when the user decides. Also, in your code, to determine if the box is checked use:
If me.check1.value = -1 then 'if its checked
'code
'to send
'email
end if

Hope this answers your questions....

Eric
 
Thanks a lot. That is exactly what I was looking for.

Doug
 

Users who are viewing this thread

Back
Top Bottom