Sub form scroll bars

Toolpusher

Registered User.
Local time
Today, 17:04
Joined
May 29, 2007
Messages
53
I want the data entry to be at the top of my sub-form so I have used the method of using two sub-forms one with no data input allowed and just above that one the sets focus on new record entry after update and only shows one record. It works fine but for the life of me I cant get rid of the vertical scroll bar on the top sub-form.

I know its because I have adjusted the size of the top sub-form on the main form to just show one line and in reality there's many records above this but it spoils the main form and user could use this scroll bar

Anyone any ideas?

TP
 
Are your two subform controls using the same form as their source object?

If so, in your main form load event put the following

Code:
TopSubForm.form.dataentry=true
BottomSubForm.form.allowadditions=false
 
Thanks CJ for prompt reply but think I am not making myself understood.

Yes both subforms are on the same main form. Top form allows dataentry but bottom does not. That works fine. The top subform only shows one line which is the dataentry line which is also what I want but it also puts vertical scroll bars on this top form which I dont want. How can I get rid of them

TP
 
If you make it slightly taller the scroll bar should disappear. Failing that in the same event as before put

topsubform.form.scrollbars=0

I think 0 removes both scroll bars, 1 shows the horizontal only and 2 the vertical only and 3 both scrollbars - you'll need to check
 
CJ

Thanks for putting up with me here . If I make top form slightly taller I just begin to see the other records on the subform and the scroll bars stay put

I also tried mytopsubform.form.scrollbars=0 in the load of the main form but nothing happened not even an error.

TP
 
just begin to see the other records on the subform
You clearly have not followed my suggestion in post #2.

If the subform is dataentry, it will only show one row
 
CJ

No I did follow your advice on the onload event for main form have the following

Private Sub Form_Load()
frmPatientsSUBVisitstop.Form.DataEntry = True

frmPatientsSUBVisit.Form.AllowAdditions = False

frmPatientsSUBVisitstop.Form.ScrollBars = 0
End Sub
 
Well, I'm not sure what the problem is - do you have code in the subform itself which may be running after the main form load event vba?

If you want to post a cut down version of your db with the problem form and related tables/queries, I'll take a look.
 

Users who are viewing this thread

Back
Top Bottom