Text Message

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • lee123
    Contributor
    • Feb 2007
    • 556

    Text Message

    hey all i wanted to finish up a project i was working 7 months ago and now i have time for this. I was looking at this and now that i have seen this again i want to add things to it i have two subforms on this one form there is a total field in one and a field named "dec" in the other that has what he has spent in that month. i want to have a textbox above the (subform) that states that he has reached over a certain amount already for instance:

    if he has purchased over $50.00 then the message would say "you have reached over $50.00 worth of items and so on.

    my question is:

    how do i call this field in the subform named (SFF) to put in the afterupdate event for the textbox named "txtmessage "

    lee123
  • jyoung2
    New Member
    • Jan 2008
    • 32

    #2
    Generally it would look like
    [forms]![Mainform].[SFF]!form.txtmessag e_AfterUpdate(0 )
    Not sure I completly understand the question though The 0 is only needed if there is a (cancel as integer) in the after update and i don't remeber off the top of my head.



    Originally posted by lee123
    hey all i wanted to finish up a project i was working 7 months ago and now i have time for this. I was looking at this and now that i have seen this again i want to add things to it i have two subforms on this one form there is a total field in one and a field named "dec" in the other that has what he has spent in that month. i want to have a textbox above the (subform) that states that he has reached over a certain amount already for instance:

    if he has purchased over $50.00 then the message would say "you have reached over $50.00 worth of items and so on.

    my question is:

    how do i call this field in the subform named (SFF) to put in the afterupdate event for the textbox named "txtmessage "

    lee123

    Comment

    • lee123
      Contributor
      • Feb 2007
      • 556

      #3
      Hi there,
      well actually i just need to know how to do this in the afterupdate event. i'm sorry if i made it sound like im calling it in a code but no i wanted to know how the code would be in the afterupdate event. this is what i thought it would be:

      Code:
      Private Sub Text88_AfterUpdate()
         IF forms! Customer! SFF.dec > 50 then 
              textmessage.caption = "You have reached the 50.00 Mark!
      End IF
      
      End Sub
      but this don't work!
      how do i get the textbox to say this.

      lee123

      Comment

      • jyoung2
        New Member
        • Jan 2008
        • 32

        #4
        Code:
        Private Sub Text88_AfterUpdate()
           IF forms!Customer!SFF![B]form[/B].dec > 50 then 
                [B]me[/B].textmessage.caption = "You have reached the 50.00 Mark!
        End IF
         
        End Sub
        Is textmessage a Label? Does this box do anything else?
        If you have a label it may be easier to set it up using visibility
        Code:
        me.textmessage.visibility = true
        see bold items for sugestions also watch your spaces you had spaces after each exclamation mark and that will casue the problem. I would use debug mode and see where the code is Breaking.

        Comment

        • NeoPa
          Recognized Expert Moderator MVP
          • Oct 2006
          • 32668

          #5
          This (Referring to Items on a Sub-Form) may help.

          Comment

          Working...