Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
|
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 18th, 2005, 03:51 PM
Friend of Wrox
 
Join Date: Jan 2005
Posts: 471
Thanks: 0
Thanked 1 Time in 1 Post
Default

Bob,
Got it downloaded. I think I have a problem with my editor setup. When I create a form, I don't have vertical and horizontal scroll bars when I'm trying to edit the form.

I hope you know what I mean.

Thanks again,

Kevin

dartcoach
 
Old December 18th, 2005, 04:14 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,093
Thanks: 1
Thanked 12 Times in 11 Posts
Default

Hi Kevin,

Not quite sure what you mean. The HScrollBar and VScrollBar controls are VB6 intrinsic controls that should just be sitting in your ToolBox. Just drop them onto a new form. Are you saying the controls don't appear in your ToolBox?

Bob

 
Old December 18th, 2005, 04:19 PM
Friend of Wrox
 
Join Date: Jan 2005
Posts: 471
Thanks: 0
Thanked 1 Time in 1 Post
Default

Bob,
What I mean is, when creating a form, if I want to make the form, say 22" wide, in Access I can keep widening it, and once it goes past the screen size, the horizontal scroll automatically shows up. I think my form editor will only let me create a form the size of my screen.

I'll keep messing with it.

Thanks for all your help.

Kevin

dartcoach
 
Old December 18th, 2005, 04:42 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,093
Thanks: 1
Thanked 12 Times in 11 Posts
Default

Hi Kevin,

The download I posted is a work-around for the fact that a VB6 form per say can't exceed the dimensions of your monitor. It uses a PictureBox control to serve as a "virtual form" that can be scrolled within the Form container. All your controls get placed on the PictureBox control, not on the form itself (with the exception of the scoll bars themselves - they can be placed anywhere because the are aligned by the code at run-time). Spend some time with the code download and the description on the link to see how it all goes together.

Bob

 
Old December 18th, 2005, 04:44 PM
Friend of Wrox
 
Join Date: Jan 2005
Posts: 471
Thanks: 0
Thanked 1 Time in 1 Post
Default

Bob,

Thanks, I've got to go to work for awhile, but I'm going to play with it when I get home.

Thank you very much for all your help so far, it is much appreciated.

Kevin




dartcoach
 
Old December 18th, 2005, 05:02 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,093
Thanks: 1
Thanked 12 Times in 11 Posts
Default

Sure thing Kevin. Learned a bunch of new VB6 form stuff myself. Don't work too hard.

Bob

 
Old December 19th, 2005, 08:46 AM
Friend of Wrox
 
Join Date: Aug 2004
Posts: 159
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi all,
Sorry for my bad english. I've migrated from VB6 to Access and i agree with Bob that Access has a large range of possibilities u can work with. Probably there is a solution to ur problem without going to VB6.
Hope an expert developer may bring some light to ur problem using VBA.
Rgds,
P

 
Old December 19th, 2005, 02:12 PM
Friend of Wrox
 
Join Date: Jan 2005
Posts: 471
Thanks: 0
Thanked 1 Time in 1 Post
Default

Bob,

Played with it, can add boxes to the picturebox at runtime. What I need to add are comboboxes instead of boxes.

Any ideas. I've tried the create control, but it doesn't like that.

Thanks again for all your help.

Kevin

dartcoach
 
Old December 19th, 2005, 02:37 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,093
Thanks: 1
Thanked 12 Times in 11 Posts
Default

Hi Kevin,

You do it by using a control array. One instance of a combo box will already have to exist on your form, but you can set its visible property to False if you like.

So drop a combo box on your form (or PictureBox in your case – I’m just using a form here) and set the following properties.

Name: ComboBoxes
Index: 0 (makes it the first control in an array of ComboBoxes)
Visible: False

Add this code to the Form_Load event:

Private Sub Form_Load()
   Load ComboBoxes(1)
   ComboBoxes(1).Top = 480
   ComboBoxes(1).Left = 240
   ComboBoxes(1).Visible = True

   Load ComboBoxes(2)
   ComboBoxes(2).Top = 840
   ComboBoxes(2).Left = 240
   ComboBoxes(2).Visible = True

   Load ComboBoxes(3)
   ComboBoxes(3).Top = 1200
   ComboBoxes(3).Left = 240
   ComboBoxes(3).Visible = True

End Sub

Three left-aligned combo boxes will display on the form at run time. The top and left properties have to be set so you don’t create a bunch of controls right on top of each other.

HTH,

Bob


 
Old December 20th, 2005, 10:13 PM
Friend of Wrox
 
Join Date: Jan 2005
Posts: 471
Thanks: 0
Thanked 1 Time in 1 Post
Default

Bob,

Thanks so much!! I've been getting things to work the way I want them to. Without you're help, I wouldn't have been able to get this far.

Thanks again!

Kevin

dartcoach





Similar Threads
Thread Thread Starter Forum Replies Last Post
Opening ,dbf file through ADO in VB6? vchell VB Databases Basics 2 September 11th, 2007 03:43 AM
opening VBA project in VB6 joseph1 VB How-To 0 July 8th, 2006 08:25 AM
Run ACCESS Aplication Without Opening ACCESS kamal1667 Access 3 January 2nd, 2006 12:13 PM
Opening unknown table names NiMot VB Databases Basics 2 July 17th, 2003 02:37 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.