Subform view

Mark O'Brien

MrExcel MVP
Joined
Feb 15, 2002
Messages
3,530
I have created my main form with several subforms for ease of future modifications. My subforms are actually really small, usually just one label and textbox control.

My question is this, is there any way for my to change the view of my subform control so that I do not see the ruler and scrollbars for each subform? i.e. I would really just like to be able to see the entire contents of my subforms on the main form just as if I'd put a commanbutton on the main form.

I'm having problems making my main form look good and this is a pain.


TIA

EDIT:: OK, I just figured out how to get rid of the rulers. (View|Rulers). How do I get rid of the little bar that says "Detail" on each subform"?
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
you can turn off the "record" selectors and scroll bars in the properties of the form.

Not sure what "Detail" you are refering to. Their is a "Detail" bar in Design view, but you need that?
 
Upvote 0
Thanks Ziggy,

The scroll bars and the "Detail" I'm referring to are present in Design View only. I guess the reason the scroll bars are there in Design view is because the container is too small to show the entirety of the subform. If I can get rid of the "Details" bar in Design View, that would solve both of my problems.
 
Upvote 0
Sorry Mark I'm lost for an answer I don't really understand why you want them removed from design view.

Ziggy
 
Upvote 0
I want them removed from design view because my sub forms are so small, I cannot place see the controls on my subforms because of the Detail bar and the scrollbars. This made lining up my text boxes and labels a complete pain. What should have taken five minutes has taken an hour. Oh well, I've done it now.

Userforms in Access are a real pain. :)

I hate Access.
 
Upvote 0
Mark O'Brien said:
Userforms in Access are a real pain. :)

I hate Access.

Of course they are. Access was designed specifically (perhaps inadvertantly) to ******** up the human brain when it comes to anything other than housing data and crunching it. That's why I use Access for the back end and Excel for the front end. Reports, etc... stink. Query the closed db with Excel Userform. DAO:

<font face=Courier New><SPAN style="color:#00007F">Sub</SPAN> Import()
<SPAN style="color:#00007F">Dim</SPAN> Cn <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Object</SPAN>, Rs <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Object</SPAN>, myCall <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">String</SPAN>
<SPAN style="color:#00007F">Dim</SPAN> mySql <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">String</SPAN>, dbFullname <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">String</SPAN>, myCnt <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN>
<SPAN style="color:#00007F">Dim</SPAN> myRng <SPAN style="color:#00007F">As</SPAN> Range
dbFullname = "c:\temp\db1.mdb"
myCall = "test" <SPAN style="color:#007F00">'SQL Variable</SPAN>
mySql = "SELECT [Field1], [Field2]" & _
            "FROM Table1 WHERE " & _
            "[Field1]=<SPAN style="color:#007F00">'" & myCall & "';" 'Stack your SQL string</SPAN>

myCall = <SPAN style="color:#00007F">Empty</SPAN> <SPAN style="color:#007F00">'Clear SQL variable string</SPAN>

<SPAN style="color:#00007F">Set</SPAN> Cn = _
    CreateObject("DAO.DBEngine.36").Workspaces(0).OpenDatabase(dbFullname, , <SPAN style="color:#00007F">False</SPAN>)

<SPAN style="color:#00007F">Set</SPAN> Rs = Cn.OpenRecordset(mySql)

<SPAN style="color:#00007F">Set</SPAN> myRng = Sheets(1).[a65536].End(3)(2) <SPAN style="color:#007F00">'Destination Range</SPAN>

<SPAN style="color:#00007F">With</SPAN> Rs
    myCnt = .RecordCount
    <SPAN style="color:#00007F">If</SPAN> myCnt > 0 <SPAN style="color:#00007F">Then</SPAN>
        .MoveLast: .MoveFirst
         <SPAN style="color:#007F00">'Pull data to first sheet, cells a1:RecordestCountRow & column 2 _
            2 fields in the sql pass</SPAN>
        myRng.Resize(myCnt + 1, 2).CopyFromRecordset Rs
    <SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">If</SPAN>
    .<SPAN style="color:#00007F">Close</SPAN>
<SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">With</SPAN>
<SPAN style="color:#00007F">Set</SPAN> myRng = <SPAN style="color:#00007F">Nothing</SPAN>
Cn.<SPAN style="color:#00007F">Close</SPAN>
<SPAN style="color:#00007F">Set</SPAN> Rs = Nothing: <SPAN style="color:#00007F">Set</SPAN> Cn = <SPAN style="color:#00007F">Nothing</SPAN>
<SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">Sub</SPAN></FONT>

ADO:

http://www.mrexcel.com/board2/viewtopic.php?t=53716&start=4

Are you sure your data is normalized? :LOL:

I too hate Access. :)
 
Upvote 0
Are you sure your data is normalized?

You're lucky that Chrisface asked me that a few days ago or else you would be the recipient of the *****-slapping.

Incidentally, my data is normalised. It's 1 normal. :biggrin:
 
Upvote 0

Forum statistics

Threads
1,221,544
Messages
6,160,428
Members
451,645
Latest member
androidmj

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