Help needed please (1 Viewer)

basehumax

Registered User.
Local time
Today, 15:00
Joined
May 14, 2018
Messages
12
Hi All

Please help i am looking vba to warm if the field entered 70 or above please have look the database

Thanks
 

Attachments

  • Database1.zip
    30.6 KB · Views: 40

June7

AWF VIP
Local time
Today, 14:00
Joined
Mar 9, 2014
Messages
5,503
Yes, can annoy users with a popup they have to respond to. Trick is figuring out what event to put code into. Could use the textbox AfterUpdate event.

Private Sub Weight_AfterUpdate()
If Me.Weight >= 70 Then MsgBox "text here"
End Sub

Or can have a permanent label with big red text with that information.
 

basehumax

Registered User.
Local time
Today, 15:00
Joined
May 14, 2018
Messages
12
Yes, can annoy users with a popup they have to respond to. Trick is figuring out what event to put code into. Could use the textbox AfterUpdate event.

Private Sub Weight_AfterUpdate()
If Me.Weight >= 70 Then MsgBox "text here"
End Sub

Or can have a permanent label with big red text with that information.

Thanks but how can i do the big red label please thanks
 

essaytee

Need a good one-liner.
Local time
Tomorrow, 08:00
Joined
Oct 20, 2008
Messages
512
Thanks but how can i do the big red label please thanks

Create a Label control on your form, name it appropriately.

Add code in the Form's OnCurrent Event, as follows, substitute for your control names.
Code:
Private Sub Form_Current()
    If Me.Weight > 70 Then
        Me.lblMsg.Caption = ">70 - special message"
    Else
        Me.lblMsg.Caption = "< 70 - whatever message"
    End If
End Sub
The above is the bare bones of what is required. All you have to think about now is how to account for when you edit your weight value, the clue is in June's post.
 

Users who are viewing this thread

Top Bottom