UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome Guest ( Log In | Register )

> Check TextBox value in a continuous form    
 
   
gekseppe
post 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)
Attached File  2010_08_25_10h45_45.png ( 32.19K ) Number of downloads: 12
 
Go to the top of the page
 
+
 
Start new topic
Replies (1 - 3)
Doug Steele
post 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.
Go to the top of the page
 
+
gekseppe
post 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)

If Me.AVR_HRcmd < Me.AVRcmd Then
...
End If

End Sub



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)
Go to the top of the page
 
+
Doug Steele
post 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 the top of the page
 
+

Thank you for your support! Reply to this topicStart new topic

Jump To Forum:
 



RSS Go to Top  ·  Lo-Fi Version Time is now: 23rd May 2013 - 11:48 PM