By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,307 Members | 1,929 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,307 IT Pros & Developers. It's quick & easy.

Text Message

lee123
100+
P: 556
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
Jan 26 '08 #1
Share this Question
Share on Google+
4 Replies


P: 32
Generally it would look like
[forms]![Mainform].[SFF]!form.txtmessage_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.



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
Jan 26 '08 #2

lee123
100+
P: 556
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:

Expand|Select|Wrap|Line Numbers
  1. Private Sub Text88_AfterUpdate()
  2.    IF forms! Customer! SFF.dec > 50 then 
  3.         textmessage.caption = "You have reached the 50.00 Mark!
  4. End IF
  5.  
  6. End Sub
but this don't work!
how do i get the textbox to say this.

lee123
Jan 27 '08 #3

P: 32
Expand|Select|Wrap|Line Numbers
  1. Private Sub Text88_AfterUpdate()
  2.    IF forms!Customer!SFF!form.dec > 50 then 
  3.         me.textmessage.caption = "You have reached the 50.00 Mark!
  4. End IF
  5.  
  6. 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
Expand|Select|Wrap|Line Numbers
  1. 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.
Jan 28 '08 #4

NeoPa
Expert Mod 15k+
P: 31,707
This (Referring to Items on a Sub-Form) may help.
Feb 2 '08 #5

Post your reply

Sign in to post your reply or Sign up for a free account.