My Assistant
|
|
Aug 25 2010, 04:00 AM
Post
#1
|
|
|
UtterAccess Member Posts: 21 From: Italy |
Hi everybody.
I have a problem with the attached continuous form: I need to detect, on 'On Current' event IF the AVG/hr is less than the value in the TextBox in the Footer of the form in order to send an e-mail. I already created a "Conditional Formatting" (i.e. red) to point out the "Hot Values" and it works fine but if I use the IF/THEN condition in 'On Current" event ACCESS only check the AVG/HR in the first row of the form and ignore the rest unless I select the AVG/HR TextBox to check. Any help will be really appreciated ! Many thanks, Giuseppe This post has been edited by gekseppe: Aug 25 2010, 04:03 AM
Attached File(s)
|
|
|
|
![]() |
Aug 25 2010, 06:39 AM
Post
#2
|
|
|
UtterAccess VIP Posts: 17,643 From: Don Mills, ON (Canada) |
What the actual code you're trying to use in the Current event?
Just in case you're misunderstanding something, the Current event fires when focus moves from one row to another. If you're referring to a control on your form in that event, it'll give the value of that control for the current row. |
|
|
|
Aug 25 2010, 08:28 AM
Post
#3
|
|
|
UtterAccess Member Posts: 21 From: Italy |
Hi Doug !
Many thanks for your reply. I tried to move the code into 'On Open' event but problem still occurs. Private Sub Form_Open(Cancel As Integer) I guess it happens because that's a continuous form: I'm trying to loop through command forms but I cannot figure it out (IMG:style_emoticons/default/crazy.gif) |
|
|
|
Aug 25 2010, 09:03 AM
Post
#4
|
|
|
UtterAccess VIP Posts: 17,643 From: Don Mills, ON (Canada) |
In my opinion, the appropriate way to do this would be to have a button on the form that would create a recordset of all rows that need an e-mail sent then loop through that recordset row by row, sending out the e-mail.
It's certainly not something you'd want to do repeatedly as the form is used (in other words, you wouldn't want it in the Current event). |
|
|
|
![]() ![]() |
|
Go to Top · Lo-Fi Version | Time is now: 23rd May 2013 - 11:48 PM |