f



Controlling order of processing controls on a form

I am using a RecordSet to assign each persons name from the RecordSet as the 
ControlSource of a TextBox. There are about 50 names and about 84 controls, 
so there intentionally will be blank controls.

These controls are arranged as a seating plan in a dining room.

All works OK except I cannot establish in which order the controls are 
accessed in a loop:-

For Each Ctl in Me.Controls
    ....
    ....
Next Ctl.

I Assumed the sequence would be in TabIndex order, but it isn't.
Does anyone know how order they are processed in is workrd out, or more 
importantly how I can force them to be processed in the required sequence?

The Control names are like
Place0101                ' TABLE No 1,     Place 1
Place0102                ' TABLE No 1,     Place 2
Place0103                ' TABLE No 1,     Place 3
....
Place0327                ' TABLE No 3,     Place 27

That is the order I need to assign the names

Many thanks

Phil 


0
phil126 (320)
2/8/2009 11:05:15 PM
comp.databases.ms-access 42670 articles. 0 followers. Post Follow

5 Replies
492 Views

Similar Articles

[PageSpeed] 16

"Phil Stanton" <phil@myfamilyname.co.uk> wrote in message 
news:f_Odnf2iR9G3-BLUnZ2dneKdnZydnZ2d@posted.plusnet...
>I am using a RecordSet to assign each persons name from the RecordSet as 
>the ControlSource of a TextBox. There are about 50 names and about 84 
>controls, so there intentionally will be blank controls.
>
> These controls are arranged as a seating plan in a dining room.
>
> All works OK except I cannot establish in which order the controls are 
> accessed in a loop:-
>
> For Each Ctl in Me.Controls
>    ....
>    ....
> Next Ctl.
>
> I Assumed the sequence would be in TabIndex order, but it isn't.
> Does anyone know how order they are processed in is workrd out, or more 
> importantly how I can force them to be processed in the required sequence?
>
> The Control names are like
> Place0101                ' TABLE No 1,     Place 1
> Place0102                ' TABLE No 1,     Place 2
> Place0103                ' TABLE No 1,     Place 3
> ...
> Place0327                ' TABLE No 3,     Place 27
>
> That is the order I need to assign the names
>
> Many thanks
>
> Phil

What I would do is, rather than relying on Access to give them to you in a 
certain order, I would just create a table that stores the control names, 
and a field specifying the order I want them in. I'd then open a recordset 
based on that table, and use those values to loop through the controls. 
Simple, and puts you in the driver's seat in full control (no pun intended! 
:-) ). Something like:

===============================
' tblSeats has three fields: CtrlName (str), TableNo (int), PlaceNo (int)

dim rs as recordset

set rs = currentdb.openrecordset("Select * From tblSeats Order By TableNo, 
PlaceNo", dbopensnapshot)

do until rs.eof
    'do something with Me.Controls(rs!CtrlName)
    'etc.

    rs.movenext
Loop
============================

HTH,

Neil 


0
nrgins (175)
2/9/2009 12:04:40 AM
Yes Neil, I think you're right

will give it a whorl next week. Many thanks

Phil

"Neil" <nrgins@gmail.com> wrote in message 
news:QqKjl.19953$Ws1.1001@nlpi064.nbdc.sbc.com...
>
> "Phil Stanton" <phil@myfamilyname.co.uk> wrote in message 
> news:f_Odnf2iR9G3-BLUnZ2dneKdnZydnZ2d@posted.plusnet...
>>I am using a RecordSet to assign each persons name from the RecordSet as 
>>the ControlSource of a TextBox. There are about 50 names and about 84 
>>controls, so there intentionally will be blank controls.
>>
>> These controls are arranged as a seating plan in a dining room.
>>
>> All works OK except I cannot establish in which order the controls are 
>> accessed in a loop:-
>>
>> For Each Ctl in Me.Controls
>>    ....
>>    ....
>> Next Ctl.
>>
>> I Assumed the sequence would be in TabIndex order, but it isn't.
>> Does anyone know how order they are processed in is workrd out, or more 
>> importantly how I can force them to be processed in the required 
>> sequence?
>>
>> The Control names are like
>> Place0101                ' TABLE No 1,     Place 1
>> Place0102                ' TABLE No 1,     Place 2
>> Place0103                ' TABLE No 1,     Place 3
>> ...
>> Place0327                ' TABLE No 3,     Place 27
>>
>> That is the order I need to assign the names
>>
>> Many thanks
>>
>> Phil
>
> What I would do is, rather than relying on Access to give them to you in a 
> certain order, I would just create a table that stores the control names, 
> and a field specifying the order I want them in. I'd then open a recordset 
> based on that table, and use those values to loop through the controls. 
> Simple, and puts you in the driver's seat in full control (no pun 
> intended! :-) ). Something like:
>
> ===============================
> ' tblSeats has three fields: CtrlName (str), TableNo (int), PlaceNo (int)
>
> dim rs as recordset
>
> set rs = currentdb.openrecordset("Select * From tblSeats Order By TableNo, 
> PlaceNo", dbopensnapshot)
>
> do until rs.eof
>    'do something with Me.Controls(rs!CtrlName)
>    'etc.
>
>    rs.movenext
> Loop
> ============================
>
> HTH,
>
> Neil
> 


0
phil126 (320)
2/9/2009 12:30:12 AM
"Phil Stanton" <phil@myfamilyname.co.uk> wrote in message 
news:KIOdnfCab5-O5BLUnZ2dnUVZ8sPinZ2d@posted.plusnet...
> Yes Neil, I think you're right
>
> will give it a whorl next week. Many thanks
>
> Phil
>

"Whorl"? Is that a technical term? ;-) 


0
nrgins (175)
2/9/2009 12:40:22 AM
Well i & o are next to each other.

finger slipped

Thanks again not only for Access advice but also spelling lesson

Phil

"Neil" <nrgins@gmail.com> wrote in message 
news:yYKjl.16409$yr3.10147@nlpi068.nbdc.sbc.com...
>
> "Phil Stanton" <phil@myfamilyname.co.uk> wrote in message 
> news:KIOdnfCab5-O5BLUnZ2dnUVZ8sPinZ2d@posted.plusnet...
>> Yes Neil, I think you're right
>>
>> will give it a whorl next week. Many thanks
>>
>> Phil
>>
>
> "Whorl"? Is that a technical term? ;-)
> 


0
phil126 (320)
2/9/2009 9:01:09 AM
"Phil Stanton" <phil@myfamilyname.co.uk> wrote in message 
news:vdCdnbPuFZ9JbRLUnZ2dnUVZ8radnZ2d@posted.plusnet...
> Well i & o are next to each other.
>
> finger slipped
>
> Thanks again not only for Access advice but also spelling lesson
>

Well, I try to help out in *any* way I can! ;-) ("Whurl"?...)

:-D

Neil 


0
nrgins (175)
2/9/2009 10:34:22 AM
Reply:

Similar Artilces:

Making a form control the criteria for the sql statement of another control (Access 2003)
I have two comboboxes on a form. Combobox1 uses field1 in another table as its source of data. What I want to do is to enable combobox2 to use field2 in that table, but only to show the rows of data that contain the item selected in combobox1. At the moment I can easily write a SQL statement with a WHERE clause, but I only know how to specifiy static criteria. What I want is a variable criteria, where the criteria is the data contained in combobox 1. Is this possible? thanks for any help :) Ste "SteMc" <google@jasmonio.supanet.com> wrote >I have two comboboxes on a fo...

Open Form in Ms-Access from a hyperlink by using dhtml control
Hey ! I'm having a little ms-access application problem. in form A I have a dhtml control which I'm trying to assign it's documentHtml property a html string. I want that the html string will contain a hyperlink which open another form in access. Can I do that ? David ...

Form layout question: How move controls in a Form to (in) a Tab Control?
Hi, I created a form with a lot of controls on it. (textboxes, pulldown's etc.) Because the form is a little full I want to move the controls to different pages on a tab control. HOW can one do this?. If I drag them the tab control is not 'activated' if the mouse pointer is above the tab control. (if one creates a new textbox and place it on the tab control this tab control page turns black to show it's activated) This does not work while dragging??! Thanks in advance, Eddie Smit Holland. (The Netherlands) >Because the form is a little full I want to move the >control...

class-based access control VS instance-based access control
Why C++ (as well as Java) adopts class-based access control instead of instance-based access control? I had never paid attention to whether an access-control is class-based or instance-based but only intuitively thought that the latter was the one being used. Since it does not seem to make sense to let an instance "a1" of Class "A" to have access to the private data of instance "a2" of the same Class A, does it? xz wrote: > Why C++ (as well as Java) adopts class-based access control instead of > instance-based access control? Mostly because of the differ...

MS Access 2002
MS Access 2002 - query form control returns funny symbols like [][] I am running an append query on a form. Access is having trouble with the calculated fields and comboboxes. Example &#8211; referring to forms!FormName!ControlName within the query should return the value of that control, correct? I am receiving symbols such as boxes [] or [][] as well as Chinese symbols. Any thoughts as to why this is happening. thanks This happens if Access does not understand the data type of the calculated controls. Typecast the calculated fields, and set the Format of unbound controls. For ...

MS Access 2000 VBA Code Shows Totally Incorrect Date from Controls on a Form
Hi, Sorry for my English. English is not my native tougue. I am working in MS Access 2000 with a SQLServer 2000 Backend database. MS Access 2000 is my GUI front end that has SQLServer linked tables in it. One of my forms has two TEXT BOX controls formated as Short Date. The form is binded to a linked table. The linked tables has about 7 records and one of the control is binded to a table field. These two controls displays the date correctly as 01/07/2006 and 31/07/2006 (I am running Windows XP, my regional setting is set to English Australia, location is set to Australia, language for non-...

no format assignment for a form's textbox control... Access assumes control's data is going to be placed in a finite length text field of a table
I have a form with two controls: [Forms]![frmMainMenu]![RootTable] - combo box [Forms]![frmMainMenu]![BodyTextHere] - text box A button on the form tries to run this SQL when clicked... INSERT INTO BodyMsgsSent (ToWhom, BodyText) SELECT DISTINCTROW [Forms]![frmMainMenu]![RootTable] AS MyTargets, [Forms]![frmMainMenu]![BodyTextHere] AS MyList; When the SQL runs, it fails with msg saying "Field length is too long". I don't know why, because BodyMsgsSent.BodyTextHere is a memo-type field. If the string I type in [Forms]![frmMainMenu]![BodyTextHere] is very short, the error does no...

enable controls on tab control form
Hello, I am trying to enable controls based on the value of a checkbox, i.e. if value = true then enable. I have a tab control form with controls on 4 tabs. I have some code (below) on the tab control "on change" event. This works for the 'first tab' but then does not work for any other tab. Any ideas? Thanks! Dave Private Sub TabCtlPage2_Change() CmdExit.SetFocus 'set the focus to exit button Select Case TabCtlPage2.Value Case Is = 1 For Each c In Me.Controls If c.Tag = "PREABY" Then c.Enabled = Nz(Me.checkbox_PREABY.Value, True) E...

Controlling a terminal in order to control gdb ...
I need to feed commands to gdb and pick them up out of a terminal (in effect feed commands to a terminal window and pick up the responses to those commands within gdb). I am wondering what toolkit will enable me to do this for gnome or x terminals ... I wish to remotely control gdb programmatically to aid in my learning of assembly language (recording register and flag settings etc and also programmatically setting up breakpoints - (controlling gdb completely programmatically) ... The way I have looked at this so far is through a scripting language such as Tcl? (?) Does anyone have any id...

a2k
I have 3 groups of controls each in their own frame and all are sitting on a page in a tab control. I want the user to be able to tab between the controls in each frame; at the moment tabbing can move the cursor to another frame, which is a bit disconcerting when the user is filling out some address fields. I've played around with the tab index properties manually and even tried to set them using VBA. However if I do this I find some controls actually disappear! To correct this I have to use Auto Order. Apart from this the app is working nicely but little things like are a bit of a pai...

Tab control order in OLE control
Recently I got the tip how to include a listview in the tab (control order) stops: SELF:oDCLV1:SetStyle(WS_TABSTOP,TRUE) This doesn't seem to work for a OCX (ole) control. Is there any way to get this working there too? Dick van Kooten ...

copying controls from a form to a tab control
I have copied approx 20 controls from a form to a tab control for reasons of space. i now cannot run code triggered by the events of these controls. for example, the following will not trigger the message box when changed: Private Sub cboA_Change() MsgBox "combo A changed" End Sub the controls are all disabled and are only enabled when the previous control has a value set. any ideas? thanks Winshent Winshent, Instead of copying and pasting, try cutting and pasting. If you copy and then paste, the original controls stay on the form so when you paste the new controls get ne...

control over plot order and spline control
I have a problem where draworder is not controlling the plotted output. The problem is occuring within an XREF. I've set the draworder in the XREF file and set VISRETAIN to 0 in the sheet in which it's attached. The problem is a profile spline that is plotting behind a grid instead of above it. Also, is there a spline equivalent to turning on linetype generation for a polyline? We are using ACAD200 and an HP Deskjet 1220c. I've been off ACAD for 2 years, so things that seem obvious to others in this group will be brand new to me. Thanks for any suggestions, Valerie...

Police state systems give you controlled legal accommulation and control of benefits and accesses...ok, what can you giys give to controls, me?
right to decide, yours, ok? ...

Valve control
Hello, I am still trying to figure out a method of controlling a discharge valve for compressor testing.&nbsp; The valve is controlled by a slider, but when it hits a certain point of being closed, the compressor surges.&nbsp; At that surge point, I want the user to click a button, and then have the valve slowly open while the data is being sent to&nbsp;a file.&nbsp; This way, the data is recorded and the valve opens to prevent damage to the compressor all at the click of one button.&nbsp; I have the VI up and running, all except for the opening part of the valve.&nbsp;...

Access 97 Database converted to Access 2000
I converted an access97 Database to Access 2K and have discovered that none of the control buttons work. Is there a simple work around ? Thanks Omey The code will not work if your references are incorrect or missing, or if there are compile errors in the code. 1. Press Ctrl+G to open the Immediate window. 2. From the Tools menu, choose References. 3. Ensure check marks beside these libraries only: - Visual Basic for Applications - Microsoft Access 9.0 - Microsoft DAO 3.6 and make sure none of these has the word "MISSING". Close the dialog. 4. ...

control the servo vs control the speed controller
Hi Is it control the speed controller is same as control the servo? I am planning to buy a serial-port-to-servo controller, and use it to control the speed controller. thanks from Peter(cmk128@hotmail.com) --Works for me, but be aware that you won't get feedback from the motor you're driving, so there may be some tendency of the motor to coast after signals to move it have stopped. -- "Steamboat Ed" Haas : I still miss Hacking the Trailing Edge! : rock and roll... www.nmpproducts.com ...

how to access database control of many oracle10g database instances on same server
I am on Redhat Linux 9 and using Oracle 10G (10.0.1.3?). I know how to create a Oracle database instance and use EM database control to administer the database. To access database control from a browser, Oracle asks to enter a URL: http://server_name:5500/em The URL does not specify the ORACLE_SID. I however want to create several database instances on the same box. Will Oracle automatically set up a different port (e.g., 5501) for second instance. All the documentation I have found on Oracle's web site refers to a single database instance on a server. Appreciate any pointers. Than...

Resize Form Controls and Subform Controls at the same time
In terms of resources, wondering if it makes a difference in adopting one of the three options below for resizing controls on a form and controls on a subform at the same time. option a.) Put the code all in the main form and refer to the controls on the subform in the main form's OnResize event. option b.) Put the code for the main form controls in the main form's OnResize event and put the code for the subform controls in the subform's OnResize event. option c.) Put all the code in a module and call it on the OnResize event of the main form. What this code is doing is positio...

Wysiwyg HTML Control / MS Webbrowser Control
hi, i need a control for a vo-app to edit some simple formatted html-text and save it to a memo-field. searching the web i found only javascript and web-based controls that are able to save the content by calling some server-side app/script. ....or has someone a hint how its possible to use the webbrowser control in editmode and save the html content? thanks stefan On Fri, 21 May 2010 17:19:23 +0200, Stefan Dietl <info@sdsoft.it> wrote: >hi, >i need a control for a vo-app to edit some simple formatted html-text and >save it to a memo-field. searching the web ...

Re: a2k
Deano wrote: > I have 3 groups of controls each in their own frame and all are > sitting on a page in a tab control. > > I want the user to be able to tab between the controls in each frame; > at the moment tabbing can move the cursor to another frame, which is > a bit disconcerting when the user is filling out some address fields. > > I've played around with the tab index properties manually and even > tried to set them using VBA. > However if I do this I find some controls actually disappear! To > correct this I have to use Auto Order. > > Apart fr...

OT: MS Access runtime wants to control all MS Office charts
Office 97, Access 97, Sagekeys scripts. In addtion of Access 97, my runtime package is installed too. This is an old application that has been running since 1998. The customer is happy with it. I have a glitch in.... Powerpoint 97. When an user double-clicks a chart, it starts my Ms Access Runtime Installer! It will do the same if he right-clicks and uses 'Edit'. If he selects 'Open', it will do it in a separate windows and it is Ok. Thius probably comes because MS Chart is shared among office apps. I would really like to have this problem even if there is a turnarou...

Access Controls in Access
How on access can you set access controls to your users? If they log in with one username and password they can just read information and if they log in with another username and password they can read and write? I have no idea how to do this, is it even possible?? Thank you Try playing with the access security tool, you can add users, groups, passwords, read/write allowances etc. to your database using that. Its under the 'Tools' menu of Access. Brian wrote: > Try playing with the access security tool, you can add users, groups, > passwords, read/write allowances etc. to you...

[rfc-dist] RFC 5417 on Control And Provisioning of Wireless Access Points (CAPWAP) Access Controller DHCP Option
A new Request for Comments is now available in online RFC libraries. RFC 5417 Title: Control And Provisioning of Wireless Access Points (CAPWAP) Access Controller DHCP Option Author: P. Calhoun Status: Standards Track Date: March 2009 Mailbox: pcalhoun@cisco.com Pages: 6 Characters: 11551 Updates/Obsoletes/SeeAlso: None I-D Tag: draft-ietf-capwap-dhc-ac-option-02.txt URL: http://www.rfc-editor....

Web resources about - Controlling order of processing controls on a form - comp.databases.ms-access

Talk:Controlling for a variable - Wikipedia, the free encyclopedia
This article is within the scope of the WikiProject Statistics , a collaborative effort to improve the coverage of statistics on Wikipedia. If ...

Controlling What You Share on Timeline - Facebook
Facebook and Privacy hat eine Notiz mit dem Titel Controlling What You Share on Timeline geschrieben. Du kannst den vollständigen Text hier lesen. ...

Balloon Snake - Pop Balloons by Controlling a Bird with the Accelerometer or by Touching on the App Store ...
Get Balloon Snake - Pop Balloons by Controlling a Bird with the Accelerometer or by Touching on the App Store. See screenshots and ratings, and ...

Controlling a Computer with Eyes - Flickr - Photo Sharing!
Some folks know I work with assistive technology, and this shot is one from many I took in the last few days at a conference in Phoenix. This ...

Controlling Doepfer modular synth with a Wiimote - YouTube
This video is about controlling a modular synth with Nintendo's wiimote gamepad, using Doepfer A-100, Doepfer MCV24, Wiimote and computer. Softwares ...

Controlling the minds of cockroaches using Microsoft's Xbox Kinect
Late last year, you were introduced to real, live, remote-controlled cockroaches. Well, the insect hackers at the North Carolina State University ...

CONTROLLING CHAOS: Twitter's Wild Ride From Doodle To IPO
CONTROLLING CHAOS: Twitter's Wild Ride From Doodle To IPO Business Insider Australia “We apologise if the following profile lacks our usual ...

Senator Dastyari slams companies 'controlling' politics
Watch Labor senator Sam Dastyari's firebrand speech he made to a Politics in the Pub audience.

Dying to be clean: The new technique for controlling feral cats
Cleanliness may be next to godliness unless you're a feral cat, in which case, cleanliness may get you a place next to god. In kitty heaven, ...

Fears Of Telstra controlling NBN - Nextgen - AAPT - Optus - HarbourIT - Budde
The NBN was supposed to create a level playing field, but there are fears that Telstra could still exert bottleneck control over access to customers, ...

Resources last updated: 2/18/2016 7:32:32 AM