Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms Programming / June 2008

Tip: Looking for answers? Try searching our database.

Access 2003 - Line segments on a form

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
arrkle - 29 Jun 2008 18:00 GMT
I am recreating a puzzle found in a book.
The form uses 72 line segments to build a particular geometric pattern (not
a maze) - and it works exactly as intended.
I used the Tool Box to put one line on the form, then made 71 copies of it.
The result, of course, is 72 separate Line controls.

Is there a way to DYNAMICALLY CREATE the line segments (i.e. the controls)?
OR, can I put one line segment on the form and DYNAMICALLY COPY it 71 times?
I have searched reference books AND the web but haven't yet found a way to
do it.

Can you help (preferably without using ADO)?
Marshall Barton - 30 Jun 2008 01:26 GMT
>I am recreating a puzzle found in a book.
>The form uses 72 line segments to build a particular geometric pattern (not
[quoted text clipped - 6 lines]
>I have searched reference books AND the web but haven't yet found a way to
>do it.

No.  Creating new controls is structky a design time
operation.  The CreateControl method can do it (only in
design view), but it is intended only for creating wizard
type design helper procedures, not something to be done in a
running app.

The standard way to deal with a situation where you don't
know a priori how many controls you will need is to
precreate (in design virew) more than a sufficient number of
invisible controls in the appropriate section.  Then, at
runtime, make the ones you want to use visible and adjust
their top, left, etc. properties.

Signature

Marsh
MVP [MS Access]

arrkle - 30 Jun 2008 19:52 GMT
Marshall,

Thanks for the help!

CreateControl is exactly what I was looking for -- and I have made it work.
Now all I have to do is tweak the positioning a little bit.

Thanks again,
Arrkle

> No.  Creating new controls is structky a design time
> operation.  The CreateControl method can do it (only in
> design view), but it is intended only for creating wizard
> type design helper procedures, not something to be done in a
> running app.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.