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

Refer to several tab pages

2
Hi!
I´m working in a database in Microsoft Office Access 2003 with Microsoft Visual Basic 6.5. I have 8 Tabs in a form.

I´m just wondering if there is a better way to reduce this lines:
Expand|Select|Wrap|Line Numbers
  1. ChildTop = 3100
  2. ChildLeft = 9000
  3. ChildWidth = 8000
  4. ChildHeight = 5200
  5. Me.Page1Child.Top = ChildTop
  6. Me.Page1Child.Left = ChildLeft
  7. Me.Page1Child.Width = ChildWidth
  8. Me.Page1Child.Height = ChildHeight
  9. Me.Page2Child.Top = ChildTop
  10. Me.Page2Child.Left = ChildLeft
  11. Me.Page2Child.Width = ChildWidth
  12. Me.Page2Child.Height = ChildHeight
  13. Me.Page3Child.Top = ChildTop
  14. Me.Page3Child.Left = ChildLeft
  15. Me.Page3Child.Width = ChildWidth
  16. Me.Page3Child.Height = ChildHeight
  17. Me.Page4Child.Top = ChildTop
  18. ...
Oct 10 '08 #1
5 1401
DonRayner
489 Expert 256MB
You would be better off taking this question over to the Visual Basic Form.
Oct 10 '08 #2
NeoPa
32,556 Expert Mod 16PB
I'm not sure Don.

This is presumably a VBA form object we're talking about.

The answer rather depends on there being some sort of pages collection. Let me see what I can find.
Oct 12 '08 #3
NeoPa
32,556 Expert Mod 16PB
Try this :
Expand|Select|Wrap|Line Numbers
  1. Dim ctl As Control
  2.  
  3. ChildTop = 3100
  4. ChildLeft = 9000
  5. ChildWidth = 8000
  6. ChildHeight = 5200
  7.  
  8. For Each ctl In Me.Controls
  9.   If ctl.ControlType = 124 Then
  10.     ctl.Top = ChildTop
  11.     ctl.Left = ChildLeft
  12.     ctl.Width = ChildWidth
  13.     ctl.Height = ChildHeight
  14.   End If
  15. Next ctl
The ControlType value of 124 indicates a Page control of course.
Oct 12 '08 #4
DonRayner
489 Expert 256MB
I'm not sure Don.

This is presumably a VBA form object we're talking about.

The answer rather depends on there being some sort of pages collection. Let me see what I can find.
Sorry about that NeoPa, it's just that I find that much of what works in VBA doesn't translate quite as you think it should over to Visual Baisc 6.

Don
Oct 13 '08 #5
NeoPa
32,556 Expert Mod 16PB
No apology necessary Don. It wasn't too clear - although the OP obviously did their best to be specific.

My solution will probably only work for an Access form. If it turns out to be a VB one, then they'll need to follow your advice anyway ;)
Oct 13 '08 #6

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

Similar topics

2
by: Mike | last post by:
I've been trying to setup Dean Allen's excellent "Refer" script. (http://www.textism.com/tools/refer/) The instructions say to add this code to the bottom of whatever web pages you want the...
3
by: D E | last post by:
What are some good methods of letting a user's "identity" (?session?) be known across several webpages. For example, a user logs in, and several pages say "Welcome back KNOWN USER" if he...
1
by: 5tein | last post by:
I mean, with XSL functions such as SELECT can I only refer to XML element values or can I somehow also refer to XML attribute values? Is there any way to refer to XML content based on attribute...
0
by: Chad A. Beckner | last post by:
I am starting to work on implementing ASP.NET (using VS.NET Dev 2003) into our current ASP 3.0 intranet setup. We have several (say 15 - 20) "applications" that are run within our intranet, which...
9
by: eitan | last post by:
Hello, I am using Microsoft Visual Studio 2003 .NET. I have several question, please. 1) I have a connection to the database, which I create it at login, by application("conMain") (I have...
1
by: Joe | last post by:
Dear all, I have many questions, please help! 1.) If i use the backup/restore function in the IIS, does the backup includes only the register and settings of web sites in the IIS only, or does it...
1
by: Paul | last post by:
I have a MDI container form "frmParent". On that form there is a tabstrip control with 2 pages. On one of those pages there is a textbox and a button. When the user clicks on the button a...
1
by: Ily | last post by:
Hi all I have several applications that are all in asp.net 2.0 I want all of these applications to have a common look and feel. This inclues things like font, company logo, button colors etc ...
3
by: alice | last post by:
I've been trying for a long time to figure this out, to have a page with several MP3 clips, and each one having a custom start and stop button next to them to play the track. I finally found a bit...
11
by: Web Search Store | last post by:
Hello, I set up a web page with 2 user controls. In classic asp, the first one did all the declarations, and the second one used the values, and could reset it. In ASP.Net so far I can't...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.