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
|
|||
|
|||
Setting a value in a subform
I have a form that has a subform that has a subform.
The subform loads a record based on a combo lookup box in the main form. I'm trying to set a value in the subform based on a value in a subform of the subform. the main Form is called [Clock Out] Subform is called [Clock Out Subform] Subform in the subform is called [Pay IOU Subform] The proceedure i am running is from the On Dirty event proceedure in the [Pay IOU Subform] . I am trying to set a value for the text box named [txtIOUAmountPaid] in the [Clock Out Subform] I can copy the [txtIOUAmountPaid] text box to the [Clock Out] main form and set the value there using: Forms("Clock Out")("txtIOUAmountPaid").Value = 64 'Note:Using 64 to test it. in the on dirty event proceedure which runs when there is a change in the [Pay IOU Subform]. however, I am unable to set the value if the control is in the [Clock Out Subform]. For some reason I can't find the [Clock Out Subform] I've typed this in the immediate window to see if the forms exist. ? CurrentProject.AllForms("Clock Out Subform").IsLoaded False. ? CurrentProject.AllForms("Clock Out").IsLoaded True ? CurrentProject.AllForms("Pay IOU Subform").IsLoaded False I am assuming that I can't set the value becuase the subforms don't appear to be loaded. But they should be. I can set other values in the subform if I type them in and they are saved with the record. Why are the subforms not showing up with the isloaded call. How can I set a control in a subform. I have tried 30 or so different combinations with dots & exclamation points with no luck. Any help appreciated thanks john michael |
#2
|
|||
|
|||
(previously answered in microsoft.public.access)
Please do not multi-post. See: http://www.mvps.org/access/netiquette.htm -- HTH Van T. Dinh MVP (Access) "John Michael" wrote in message ... I have a form that has a subform that has a subform. The subform loads a record based on a combo lookup box in the main form. I'm trying to set a value in the subform based on a value in a subform of the subform. the main Form is called [Clock Out] Subform is called [Clock Out Subform] Subform in the subform is called [Pay IOU Subform] The proceedure i am running is from the On Dirty event proceedure in the [Pay IOU Subform] . I am trying to set a value for the text box named [txtIOUAmountPaid] in the [Clock Out Subform] I can copy the [txtIOUAmountPaid] text box to the [Clock Out] main form and set the value there using: Forms("Clock Out")("txtIOUAmountPaid").Value = 64 'Note:Using 64 to test it. in the on dirty event proceedure which runs when there is a change in the [Pay IOU Subform]. however, I am unable to set the value if the control is in the [Clock Out Subform]. For some reason I can't find the [Clock Out Subform] I've typed this in the immediate window to see if the forms exist. ? CurrentProject.AllForms("Clock Out Subform").IsLoaded False. ? CurrentProject.AllForms("Clock Out").IsLoaded True ? CurrentProject.AllForms("Pay IOU Subform").IsLoaded False I am assuming that I can't set the value becuase the subforms don't appear to be loaded. But they should be. I can set other values in the subform if I type them in and they are saved with the record. Why are the subforms not showing up with the isloaded call. How can I set a control in a subform. I have tried 30 or so different combinations with dots & exclamation points with no luck. Any help appreciated thanks john michael |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Setting a value in a subform | John Michael | General Discussion | 1 | August 26th, 2004 09:32 AM |
Setting focus to a control on a subform on opening | John S. Ford, MD | New Users | 3 | July 14th, 2004 06:36 AM |
Setting focus to a control on a subform on opening | John S. Ford, MD | Using Forms | 3 | July 14th, 2004 06:36 AM |
Setting focus to a control on a subform on opening | John S. Ford, MD | General Discussion | 6 | July 14th, 2004 06:36 AM |