|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Free Web 2.0 Code Generator! Generate data entry and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
|
|
#1
|
|||
|
|||
|
Does anyone have any ideas on what is wrong with this statement?
Load (Forms![Clinical Audit Report Form].[subform recommendations]) I checked the help and it says 'Load object'. That's all. But when I type the word Load, the quick info that pops up tells me to use round brackets around my object. I have tried the whole thing with and without brackets and nothing works. I need to load the subform into the memory but not show it, and to do that I have to have the parent form loaded I think, which is why my statement looks the way it does. I've also tried the following combinations and still get roughly the same error (can't find form). Load Forms![Clinical Audit Report Form].[subform recommendations] Load (Forms.[Clinical Audit Report Form].[subform recommendations]) Load [subform recommendations] Load Forms![Clinical Audit Report Form]![subform recommendations] Any help appreciated, thanks! |
|
#2
|
|||
|
|||
|
By loading the parent form, the subform is automatically loaded, because it only exists when the parent form exists and is part of it. This looks like this is being done through Access, if this is the case, you can actually load the subform explicitly, because each subform has a form name that can be called, but it then won't be attached to the parent form which it looks like you need. What you may want to do, is load the parent form, then hide the subform by changing the visibility property to false. I hope this helps!
|
|
#3
|
|||
|
|||
|
Thanks for that. I don't need the parent form loaded but I have tried just loading the subform and it says it can't find the form. However when I try to load just the parent I get the same message. Basically nothing will load. There must be something wrong with the syntax but I just don't know what.
|
|
#4
|
|||
|
|||
|
In Access, go to the forms tab, and see what the subform is actually named. From there you should be able to explicitly open it via the form name as its own object. You may actually want to use the DoCmd to open the form:
DoCmd.OpenForm FormName:="subforms recommendations" I believe that this is the way that you have to use to open a form in Access. I hope that this helps you solve your problem! |
![]() |
| Viewing: ASP Free Forums > Programming > Visual Basic Programming > Load Statement |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|