473,396 Members | 1,996 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,396 software developers and data experts.

Have forms B, C and D open in a specific location in relation to A.

Hi guys. Firstly I would like to say I have used the site for a while now and it's great, this is the first time I've had to ask a new question.

I have a form A, and within that form I have a frame. There is also a command button on A that will open B. There is a button on B that opens C and so on. My problem is that I am trying to code forms B, C, D, E and all the rest to open in the frame on form A, wherever that form is. I say that because I played with saving the other forms over the location I wanted, and when they opened it seemed to work, but whenever form A was moved the effect was obviously lost.

I'm working with Visual Basic in Access 2003. Any help would be greatly appreciated.

Thanks!
Apr 21 '10 #1
3 1157
vb5prgrmr
305 Expert 100+
Well considering that you are working with Visual Basic for Applications (VBA) from within M$ Access which is probably version 6.5 and NOT Visual Basic 6.0... That and you have not shown us the code you presently use that "seems" to work unless the form "A" is moved... You make it really hard for us to help you...
May 5 '10 #2
My appologies for not being clear enough and for my lack of response.

There is no code for my "almost solution". What I meant is that when you save and close down the form it will reopen in the same location. What I was doing was saving the first form (A) in a set place, then saving (B), (C) and so on so they are over the frame in (A). This only works until someone moves form (A) then the next forms are out of place. I'm sorry I can't show you any code, because its the code that I need. Is there a line of code that will tell a loading form to open in specific cordinates of an existing form.

So (A) is open, you press a command button to open (B)and on load (B) opens within the coordinates of the frame placed on form (A).

Is that any clearer?
Jun 7 '10 #3
vb5prgrmr
305 Expert 100+
Okay,... here is how I would do something like this in vb6...
Expand|Select|Wrap|Line Numbers
  1. Option Explicit
  2.  
  3. Sub Main()
  4. Load Form1
  5. Form1.Move 0, 0
  6. Load Form2
  7. Form2.Move Form1.Left + Form1.Width, 0
  8. Load Form3
  9. Form3.Move 0, Form1.Top + Form1.Height
  10. Load Form4
  11. Form4.Move Form1.Left + Form1.Width, Form1.Top + Form1.Height
  12. Form1.Show
  13. Form2.Show
  14. Form3.Show
  15. Form4.Show
  16. End Sub
  17.  
What the above does is to set Form1's left and top at zero so it would be in the upper left portion of the screen. Then based off of that I set the other three forms based on its height and width. Now, if it is not obvious to you, these 4 forms are the same height and width so it was easy. If your forms are of different sizes, then you will have to compensate for that.



Good Luck
Jun 8 '10 #4

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

Similar topics

4
by: Mark Lees | last post by:
I've built a simple DB and I'm having my users test it at a different location running on a single workstation. Mean while I'm making changes to the forms and reports on my workstation. How do I...
9
by: BLUE WATER | last post by:
Help, When I am finished entering in data into my form A, I press the save button that saves this new data to a new record. However I would like my other form to open at a specific record, the...
6
by: Ayende Rahien | last post by:
Excetremely annoying problem, I've an application with a long startup time. So I created another form with my logo in it to as a splash screen. The splash screen is run from another thread and is...
4
by: Greg Burns | last post by:
I have built a web app that uses forms authentication. There isn't a "remember me" feature (i.e. the authentication cookie is not permanent). When you close the browser, and open a new one, you...
11
by: VB Programmer | last post by:
PLEASE HELP.... I'm having trouble. In my login form after I've verified the username/password are valid I do this: Select Case iMyPrivilege Case 0 Dim arrRoles() As String = {"guest"}...
7
by: Mike Bulava | last post by:
I have created a base form that I plan to use throughout my application let call the form form1. I have Built the project then add another form that inherits from form1, I add a few panel controls...
2
by: Kash | last post by:
Hi everybody: I'm trying to use forms-based authentication in my web application and it works quite fine when I put web.config file in the root of my web directory. But this results that all users...
2
by: Darrel | last post by:
My app has an 'admin' folder. This is the only directory i need to apply forms authentication to. Googling seems to indicate that the solution is to just give the admin folder it's own config...
4
by: RMA | last post by:
Hello All, Is it possible to add an rss feed (e.g. an .aspx page that writes xml content to the response stream) to a forms authenticated web site? Anonymous users shouldn't be able to read the...
1
by: Sean | last post by:
Hi, I've taken over a website, which has an admin section that is currently open. I added Forms Authentication to the admin directory with the using the location section in web.config: ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.