Newbie question about subforms

AlexanderBB

Well-known Member
Joined
Jul 1, 2009
Messages
1,958
Office Version
  1. 2019
  2. 2016
Platform
  1. Windows
Hi,

Trying to use a subForm for the first time. Because Access forms don't have proper Frames (where you can have controls in a Frame and make it visible or not) a suggestion was I use a subForm instead.

Most descriptions via Google say to use the subform wizard. But this asks: What data would I like (existing tables or queries or an existing Form).
I want neither. I want to add unbound controls, and design my own UI for a specific purpose.

Trying to add controls to the subform ,as if it were a Form, just adds the controls to the main Form. Can subforms not have controls ?

Can I do what want to do ? Also I see no back colour property for a subform. Must it be white only ?

Thanks for any help.
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
You can add controls to a subform, change backcolor, etc. etc. Sometimes it's easier to click on the edge of the subform to select it and the "open in a new window". You get to see it more clearly that way.

You can also create your subform directly as a new form and then later drag it onto the main form when you are ready.
 
Upvote 0
Thanks xenou, I'll have to have another crack at it. It's good it's possible.

Hey, can I run thought my plans for it - you may see a problem? I have a Form with a menu on the LH side.
Depending on which menu item is selected, the rest of the Form has a mix of unbound controls, text boxes, labels etc relative to what was chosen.
As another menu item is selected, that's replaced with the new 'page'. In Excel I used a multiple Frames, and set the required one visible.

Can I do the same withe a SubForm? Or is this a silly approach, as there's something better? I don't want a tabbed Form as my Menu looks better !
 
Upvote 0
Subforms would have the benefit of being easily made visible/invisible and are manageable containers, so to speak. I think that most Access developers would just use forms as such, not subforms or trying to make things visible/invisible - just let the user make a choice and then open the form related to that choice. I'd go for whatever is simplest - less code better code. I might recommend using a tabbed form but they always seemed to look bad, unlike in Excel where they work very nicely (unless this has changed in recent years). Anyway, an actual tabbed form is not much different from showing forms on tabs, in Access 2007+. I tend to prefer windowed forms still, for myself.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,221,877
Messages
6,162,579
Members
451,776
Latest member
bosvinn

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top