简体   繁体   中英

Open a Form as a SubForm

On a GUI based on forms, I try to open and close some forms in order to do calculations.

I want to do it only with Access macros (for easier maintenance by non-technical personnel).

The problem is not to open and close the forms, I've found a way to do this with:

Close Window
ObjectType
ObjectName
Save: With Confirmation

OpenForm
Form Name: destinationForm
Display
Filter Name
Where Condition
Data Mode
Window Mode: Standard

But when the forms are part of bigger form (that I called Layout for explicit reasons), this macro close the main form and open destinationForm as a new one.

I know this behaviour is perfectly normal , but I haven't found marcos closing subform and opening other ones yet, or, even easier, changing Object Source of the subform object of my Layout form.

A Form is opened in Access as a sub form, if the SourceObject of a SubForm Control is set to it, and the parent form is loaded. So there is actually no such a thing as opening or closing a sub form.
Use SetProperty Macro Action to either set SubForm's IsVisible property , or it's SourceObject Property .
You could also use a Tab Control .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM