If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Problem with After_Update event
I have text box with code in the after_update event. The code is very
simple [txtWeekDay] = "Testing this event" My problem is that if the form is set to AllowAdditions = False, then after_update doesn't execute UNLESS I put a break point in it. Then it does execute. So..... I'm not positive that it doesn't execute, but I'm positive that txtWeekDay doesn't get set unless the form is set to AllowAdditions = True. Any suggestions? (Other than setting AllowAdditions to true, which I don't want to to at this point.) |
#2
|
|||
|
|||
Laurel,
I'm not sure what you mean... doesn't execute UNLESS I put a break point in it. You can programatically remove and reinstall AllowAdditions. Me.AllowAdditions = True [txtWeekDay] = "Testing this event" Me.AllowAdditions = False -- hth Al Camp Candia Computer Consulting - Candia NH http://home.comcast.net/~cccsolutions "Laurel" wrote in message ... I have text box with code in the after_update event. The code is very simple My problem is that if the form is set to AllowAdditions = False, then after_update doesn't execute UNLESS I put a break point in it. Then it does execute. So..... I'm not positive that it doesn't execute, but I'm positive that txtWeekDay doesn't get set unless the form is set to AllowAdditions = True. Any suggestions? (Other than setting AllowAdditions to true, which I don't want to to at this point.) |
#3
|
|||
|
|||
I have been programatticaly setting it and unsetting it, as well as setting
it in the form. Either method produces the same results, but progromatically setting it to true to solve this problem, becaue it creates that empty row that I don't want. It's probably hard to understand because, literally, I mean that if the form is set to AllowAdditions = false, the code below does not execute (txtWeekDay doesn't get set to "Testing this event." BUT - Without changing anything else. If I put a breakpoint on [txtWeekDay] = "Testing this event," then txtWeekDay DOES get set. I've also tried using the Exit event. Same behavior. "Al Camp" wrote in message ... Laurel, I'm not sure what you mean... doesn't execute UNLESS I put a break point in it. You can programatically remove and reinstall AllowAdditions. Me.AllowAdditions = True [txtWeekDay] = "Testing this event" Me.AllowAdditions = False -- hth Al Camp Candia Computer Consulting - Candia NH http://home.comcast.net/~cccsolutions "Laurel" wrote in message ... I have text box with code in the after_update event. The code is very simple My problem is that if the form is set to AllowAdditions = False, then after_update doesn't execute UNLESS I put a break point in it. Then it does execute. So..... I'm not positive that it doesn't execute, but I'm positive that txtWeekDay doesn't get set unless the form is set to AllowAdditions = True. Any suggestions? (Other than setting AllowAdditions to true, which I don't want to to at this point.) |
#4
|
|||
|
|||
Do you have a contiuous form where you set AllowAdditions = False so you
won't see a new record line? Is the field with your AfterUpdate code on an existing record? What are you trying to do, and what are you doing to trigger the AfterUpdate event... explain in detail. "Programatically" updating the value of a field does not trigger the AfterUpdate event. You have to "call" the AfterUpdate event in that code if you want AfterUpdate to trigger. A field in an existing record with AllowEdits/Additions/Deletes set to NO can still be programatically updated. Even if the field is set to Disable/Locked... it can still be programatically updated. -- hth Al Camp Candia Computer Consulting - Candia NH http://home.comcast.net/~cccsolutions "Laurel" wrote in message ... I have been programatticaly setting it and unsetting it, as well as setting it in the form. Either method produces the same results, but progromatically setting it to true to solve this problem, becaue it creates that empty row that I don't want. It's probably hard to understand because, literally, I mean that if the form is set to AllowAdditions = false, the code below does not execute (txtWeekDay doesn't get set to "Testing this event." BUT - Without changing anything else. If I put a breakpoint on [txtWeekDay] = "Testing this event," then txtWeekDay DOES get set. I've also tried using the Exit event. Same behavior. "Al Camp" wrote in message ... Laurel, I'm not sure what you mean... doesn't execute UNLESS I put a break point in it. You can programatically remove and reinstall AllowAdditions. Me.AllowAdditions = True [txtWeekDay] = "Testing this event" Me.AllowAdditions = False -- hth Al Camp Candia Computer Consulting - Candia NH http://home.comcast.net/~cccsolutions "Laurel" wrote in message ... I have text box with code in the after_update event. The code is very simple My problem is that if the form is set to AllowAdditions = False, then after_update doesn't execute UNLESS I put a break point in it. Then it does execute. So..... I'm not positive that it doesn't execute, but I'm positive that txtWeekDay doesn't get set unless the form is set to AllowAdditions = True. Any suggestions? (Other than setting AllowAdditions to true, which I don't want to to at this point.) |
#5
|
|||
|
|||
"Al Camp" wrote in message ... Do you have a contiuous form where you set AllowAdditions = False so you won't see a new record line? Yes Is the field with your AfterUpdate code on an existing record? No, it's an unbound text box What are you trying to do, and what are you doing to trigger the AfterUpdate event... explain in detail. The field in question is a date field. It is part of the criteria for the retrieval of the rows in the form. I don't want to see an empty row before the person enters the retrieval value. The after_update is triggered (or should be triggered....) when someone puts data in that unbound text box and then leaves it. The code in After_Update normally just executes a function that puts the name of the day of the week in another text box. If AllowAdditions is false, the name of the week doesn't get assigned when the person tabs or clicks off of the date box. If it is true OR.... if I put a break in after_update with the debugger, then the name-of-the-day field gets assigned properly. "Programatically" updating the value of a field does not trigger the AfterUpdate event. You have to "call" the AfterUpdate event in that code if you want AfterUpdate to trigger. No, I wasn't progromatically setting the value of the field. I was doing this... Call txtScore_Date_AfterUpdate in the activate event. This was so the day name would display based on the default value of the date unbound text box. So - txtScore_Date_AfterUpdate should have been executed in two ways 1 - By code in the Activate event 2 - Whenever the user entered data in txtScore_Date In both instances, whatever code I happened to have in the txtScore_Date_AfterUpdate event only executed (or only appeared to execute) if the form was set to AllowAdditions = true. This was true whether I put a statement to that effect in code, or whether I set the value in Properties. A field in an existing record with AllowEdits/Additions/Deletes set to NO can still be programatically updated. Even if the field is set to Disable/Locked... it can still be programatically updated. Yeah, but by now I hope it will be clear that is not the issue. -- hth Al Camp Candia Computer Consulting - Candia NH http://home.comcast.net/~cccsolutions "Laurel" wrote in message ... I have been programatticaly setting it and unsetting it, as well as setting it in the form. Either method produces the same results, but progromatically setting it to true to solve this problem, becaue it creates that empty row that I don't want. It's probably hard to understand because, literally, I mean that if the form is set to AllowAdditions = false, the code below does not execute (txtWeekDay doesn't get set to "Testing this event." BUT - Without changing anything else. If I put a breakpoint on [txtWeekDay] = "Testing this event," then txtWeekDay DOES get set. I've also tried using the Exit event. Same behavior. "Al Camp" wrote in message ... Laurel, I'm not sure what you mean... doesn't execute UNLESS I put a break point in it. You can programatically remove and reinstall AllowAdditions. Me.AllowAdditions = True [txtWeekDay] = "Testing this event" Me.AllowAdditions = False -- hth Al Camp Candia Computer Consulting - Candia NH http://home.comcast.net/~cccsolutions "Laurel" wrote in message ... I have text box with code in the after_update event. The code is very simple My problem is that if the form is set to AllowAdditions = False, then after_update doesn't execute UNLESS I put a break point in it. Then it does execute. So..... I'm not positive that it doesn't execute, but I'm positive that txtWeekDay doesn't get set unless the form is set to AllowAdditions = True. Any suggestions? (Other than setting AllowAdditions to true, which I don't want to to at this point.) |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
What event gets called AFTER a delete | Patrick Wolf | General Discussion | 4 | May 13th, 2005 05:56 AM |
strategy for data entry in multiple tables | LAF | Using Forms | 18 | April 25th, 2005 04:04 AM |
Value is Negative Code Problem! | Dave Elliott | Using Forms | 15 | November 10th, 2004 02:29 PM |
Productkey problem when installing office 2003 on network | Stefan Schreurs | Setup, Installing & Configuration | 1 | June 1st, 2004 11:16 PM |
MsiInstaller Events on a Win2000 Terminal Server | jwgoerlich | Setup, Installing & Configuration | 0 | May 26th, 2004 06:30 PM |