473,420 Members | 3,645 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,420 software developers and data experts.

How to resize subform after using source object to change source in vba

Hi, I have a form with a subform which has vba to resize when open. I use a dropdown menu to change the source of the subform using source object in vba but when i do this the subform changes size and is too small. Has anyone got any advice on how to resize the subform after changing the source of the subform?
Sep 1 '23 #1
2 12440
NeoPa
32,556 Expert Mod 16PB
Hi Wanie2023.

Welcome to Bytes.com.

Excuse me if you've tried this already. It seems very obvious but your post doesn't really tell us very much about what you are working with.

You already have code that resizes the Subform object when the main Form is opened. I would suggest that this code is removed from there and placed immediately after the line of code where you set the .Form property of your Subform object.

If there is a reason why this might not be appropriate, or doesn't work, then please respond with the appropriate information about your situation so that we're in a position to help you with it.
Sep 1 '23 #2
isladogs
456 Expert Mod 256MB
Cross posted at another forum (AWF) where I discovered the OP was using an old version of my automatic form resizing code
I wrote this response at the other forum:

You are using an old version of the code originally written by Jamie Czernik back in 2003 but significantly modified by me over the past 20 years.
Please study my detailed 4-part tutorial starting with ResizeForm Me - A Tutorial in Automatic Form Resizing

I recommend you also download the latest version of the example app with updated code
Sep 2 '23 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

8
by: dixie | last post by:
I have a report with a subreport. The source object for this subreport varies according to the value of a field in a table. I am trying to programmatically set the object source for the subreport...
3
by: Shannan Casteel via AccessMonster.com | last post by:
I have a subform for listing parts. It has fields including: ClaimID, ITEM, NET PRICE, LIST PRICE, Quantity, Supplier, and a calculated field called Part Total. The subform is based on a...
5
by: Vin | last post by:
Hi, I am using the following code to draw whatever the user draws using x,y. // draws lines directly on a winform. CreateGraphics().DrawLine(APen, x, y, OldX, OldY); Now how do I save the...
5
by: Christopher D. Wiederspan | last post by:
This is a bit tough to figure out the best way to ask, but here it goes. I've got a class, say MyObject, and everytime this class is instanciated, I actually want to get a reference to an existing...
8
by: Spam Trap | last post by:
I am getting strange resizing problems when using an inherited form. Controls are moving themselves seemingly randomly, but reproducibly. "frmBase" is my base class (a windows form), and...
2
by: heatstor | last post by:
Hi, When using the webrequest object, is there a way to make the source ip anonymous before connecting to a URL/website. Any help will be appreciated. Asim.
0
by: mr_doles | last post by:
Is there an event that is raised when a Binding Source filter has changed? If there is not one (I can't find it if there is) is there a way to determine if the Binding Source's filter has changed?
5
by: wxnut | last post by:
In VB 2005 I have six seperately named picture boxes (arranged in a table layout control) in which I plot different X/Y data lines. I would like to be able to right-click on a specific picture box...
2
by: Mark | last post by:
IE creates an object of every ID'd HTML tag (so it appears), and each object sets a property for any parameter I set in the tag. For example, my HTML might be: <td id='cell1'...
2
by: Yene | last post by:
Am trying to use my user object to hold one value after the user has logged in my website. when loging in the user object id is set using user.setid("id"); Once this is done. I want to use...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.