Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    MS ACCESS & have generously sponsored dedicated servers and web hosting to ensure a reliable and scalable dedicated hosting solution for

Control Array In Access / Text Boxes As Objects


Is it possible to simulate a control array in MS Access?

Iím using a restricted version of Access 2000. I can use all normal features but some Active X controls are not licensed and it will not be possible to licence them in time I have available for my project.

I have a form which has 14 combo boxes and 24 text boxes to allow user to choose shift type and enter start and end times of shift. I know in VB 6 I have used control arrays which has vastly simplified the whole code.

I have experimented with treating the text boxes as objects and trying to create a string with the first part of the name and using numbers to differentiate between the textboxes but Access does not seem to like this.

The code I have tried is below:

Dim obTextBox As TextBox
Dim str As String

str = "Forms!frm_Shift_Entry_3!txtFST2"

ĎSet obTextBox = Forms!frm_Shift_Entry_3!txtFST
'Set obTextBox = str

obTextBox.Name = "txtFST2"
obTextBox.Value = Format("12:35", "Short Time")
'b = 7
'obTextBox.Name = "txtFST" & b
'obTextBox.Value = Format("17:12", "Short Time")

commented out sections are other options I have tried.

Can anyone point out any mistakes Iím making or advise whether this is possible in Access?



View Complete Forum Thread with Replies
Sponsored Links:

Related Messages:
Access 2007 Control Array
Anyone know if Access 2007 has control arrays or some thing similar?

View Replies !   View Related
Maximum Text Boxes On A Tab Control?
Can anyone tell me the max number of other controls that can be held on one Tab Control?


DJ :confused:

View Replies !   View Related
Text Boxes Control Source = Calculation Can't Save Sum
I've got a text box on my form header with a calculation in the control source that adds values from other text boxes on my form.
My problem is that since the calculation is in the control source of my text box I can not save the sum of the calculation to a field on the forms bound table.
Is there a way to move this calculation out of the control source and still have the calculation populate this text box with the sum of the calculation, so I can choice a field in which to save this calculations sum.

Calculation in the text box control source=
[Tot40yrcomp]+[Totfelt1536]+[Totfelt3036]+ there will be many more other text boxes added.

Thanks--Any help will be greatly appreciated.

View Replies !   View Related
If Some Text Boxes Empty Dont Allow Other Fields Access
Hello Friends,

Thank you for all the help i have gotten over the past couple days, as you can tell i am new and seek somebodys experience and wisdom to solve my issue.

I have a simple Form, That allows the users to enter contact information.

At the very top I have "Name" and "Age" and below it i have other fields such as Address, city, state, etc...

How can I make it so the user does not have access to the other information until they type in BOTH fields "Name" and "age" first.

Can somebody please show me how the Code might look like.

Thank you for your time.

View Replies !   View Related
Forms +List Boxes +Text Boxes With Formulas
I have a form with a List Box (List BoxA) that returns a value from a query. I then have a Text Box (Text BoxB) that uses the value from List BoxB and multiplies it by let's say 2. It works giving me the correct value but only becomes visible after I click inside List BoxA. How can I make it visible as soon as the form is opened? I tried refreshing the form data, didn't work and I tried a requery macro which didn't work either.



View Replies !   View Related
Copying Objects From Plain Form To Tab Control

I have an old form (see oldform pics) and a new form (see newform pics).
The old form has controls on it which work just dandy (well, at least they display and store information).
The new, tabbed, form however does not. What's up with that?
I simply created a form, created a tab control, went to my old form in design view, selected some objects, right-clicked-copy, went back to the new tabbed form, right-clicked-paste somewhere in the middle on the tab control, and... Presto! Nothing.... Just #Name?

Strange thing is, when I create the control, for example InitialCall, myself or using the wizard, the #Name? disappears, so then it works like it should.

What's going on? I need to do this for a bunch of controls.... and I would hate to have to do them all 140+ all over again by hand.... copy/paste would be so nice..... :)

View Replies !   View Related
Clearing Text Boxes/combo Boxes?
Another quick request:

What would the code be for a button which clears the contents of a text box or a combo box on a form?

Many thanks,


View Replies !   View Related
New Text Boxes And Check Boxes Don't Work
I added some new controls into existing form. I made sure I added those new control names to Table source as well. For some reason, I dont get the values either in the form or in table. Please help. Thanks.
By the way, how can I attach an attachment in this forum. This if first time for me in this forum.

View Replies !   View Related
Access Control Source For Text Box

im trying to add a text box for entering a date into the table database for my form but i cannot seem to connect the control source to the text box, the name of the box/script is not appearing in the control source list. I have already made a column in my table for this box on the form but just cannot connect the two properly?

Any quick thoughts on this?


View Replies !   View Related
Combo Boxes / Text Boxes
Hi guys, I have a related databes with about 20 tables.

My main table stores the data linking with most of the other tables. This main table stores football match records with player line ups. Initially I had a problem linking the 11 player fields in the main table to the player table, Icould only do it with 1, so someone at work suggested to link it using the lookup function. This worked brilliantly. However, now I am designing a GUI with forms but the forms have combo boxes where the lookup function was used and when i change these to text boxes, the players names are replaced with their ID numbers.

Is there any way of creating the form without the unsightly combo boxes, as they won't be needed, the GUI will be read-only. I look forward to your help!!

View Replies !   View Related
Check Boxes And Text Boxes
I have a form with a check box among other itmes. What I want to happen is, when the user checks the check box, I want the text box to the right of it to be made visible and to let the user write text. But I only want this text box to be visible when the check box is checked. The check box is if the user wish to put a comment in the form, he will click the check box and then I want my text box to appear so that he may write the comment in the text box. Please help with this. Thanks

View Replies !   View Related
Combo Boxes And Text Boxes
I have a table that has client names and addresses. I have designed a form to be able to invoice these clients and everything is fine however what I'd like to do is have the address of the client appear automatically.

I have set the client names in a combo box and would like their address to appear in either a text box or sunken label automatically from the table. Is this possible and how do I do it.

Please keep in mind that I've done basic programming so please be kind to this newbie :D

View Replies !   View Related
How To Position Footer After All Detail Control Boxes
I have a standard form with Header, Detail, and Footer sections.
The detail section is populated by a mixture of queries and calculated control boxes.
When the detail section overruns its space, I get a vertical scroll bar to the right and then the footer is displayed. So, the footer always stays where it is and the scroll bar only moves the detail section.

Is it possible to get the scroll bar moving the whole lot so that the footer is not permanently viewable on the page and would appear after all the Detail boxes ?

View Replies !   View Related
Making Control Boxes Show 0 If No Records
I have a form where the records are propulated by ane xpression, which checks and sums database values.

Sometimes, the control boxes are empty as there is no data to sum for a particular record. Is there a way to get the control box to show the value 0 ?

I've tried default's, etc. but that doesn't seem to work...probably because the expression returns a NULL value.

I know it can be done using IIf but that will complicate the formulas even further.
Is there perhaps a way to do it using code instead ?

View Replies !   View Related
Frame Option Buttons To Control Combo Boxes
Hi all, a newbie with novice access skills.

I'm very good with utilizing the access tools however I can only code in vb editor minimally. What I'm looking to do is have the option buttons control two combo boxes. One to search by user name and the other to search by serial #. I've created an option group with two buttons I set the default values in the combo boxes in accordance with the option buttons However, the option buttons aren't doing what they are supposed to do. I've been told I need to tweak the code for the buttons in order to make them control the combo boxes. Does anybody know what I need to do to make this happen? Ultimately the user will be able to click either of the buttons to perform a search through a single combo box.

Thanks to everyone out there for making this possible. Your expert knowledge will help me grow into an expert myself.

Thanks to all in advance! :confused:

View Replies !   View Related
How To Access/Reference A PHP Array In VBA

I'm relatively new to VBA and I've just started using the IE Object to access a webpage and fill in values and submit them based on values I pass them in Access 2003 VBA. I've been able to open an IE object, post values to text boxes and some radio controls and then submit in order to do a sort of account creation automation.

The problem I have run into is that some of the forms have checkboxes and they are arrays. I try to reference the name/id of the input class controls in VBA, but I get nothing but errors. I've tried passing them values based on what I see when I 'View Source' of the page.

Does anyone have any ideas how I can access these controls and pass them values?? I've tried brackets and just .Value = #####, which gives me the property/method not available error. Any advice would be greatly appreciated.


View Replies !   View Related
Storing Array Values In Access

I wanted to catch a little advice if I may be so bold. I have a HTML form with a series of checkbox values.

Code:<form method=post action=form-test.asp><input type=checkbox name=drinks value='cocal-cola'>cocal-cola<input type=checkbox name=drinks value='sprite'>sprite'<input type=checkbox name=drinks value='lucozade'>lucozade<input type=checkbox name=drinks value='oasis'>oasis<input type=submit value='Submit'></form>

Normally I would gather these up into an array using ASP and email the split up comma separated values out to the client via an email.

Code:drinks=Request("drinks")drinks_split=split(drinks,",")'email drinks to client

However, this time I need to store those values in an access database. I am assuming that the client may want to run queries on the different array values, for example, how may people chose coca cola and sprite.

Is it better to store the value separately - one Ms access field for coca cola, one for sprite (which is what I thought I would have to do to create queries on this) - or can they be stored under one field heading "drinks" and queries be performed on different values within that field?

Could someone explain a quick way of doing the latter i possible in MS access and the SQL for querying?



View Replies !   View Related
Text Boxes
I have two applications that I am developing,

App1 = Standard data collection form with numberous text boxes, drop downs etc

App2 = Access database that I set up to read the NMEA String coming from a GPS Unit. I then parse it up and write the values to variables.

What I want to do is combine the two apps. I created another database and brought both into the same form (although that are still working independently). And Yes they are workign fine. Now I want to bridge the two.

Right now I click a button and the XY Coordinates from the GPS populate 2 text boxes from App2. I need them to populate 2 text boxes from App1, which will then update the database. I can do this by settign the Control Source of App1's text boxes to the App2 text box. When I click the value is passed to App1's text boxes....Great that works...BUT

But now the App1's Text Boxes Control Source is not pointing to the Fields in the table so it WILL NOT Update that value.

Is there a way to keep the App1 text box Control Source pointing to the FIELD in the table and push the value of the App2 text box into the Text box of App1 without changing the control source

That make any sense?

View Replies !   View Related
Text Boxes
I am trying to add a field where you can enter a somewhat large amount of text.(at least a paragraph) If i add a text box it only lets me enter 128 characters. If i add a microsoft 2.0 text box, it allows me to enter as many characters, but tells me i have entered too much text for the box. Help!!! This is my first time back on acceess in about a year!!

View Replies !   View Related
Using Text Boxes In A Between Statment
Hello guys and Girls

I am trying to setup a query that will return only the records in a date range that is user specified. In the Criteria of the date field I entered this

Between [Forms]![Report Switchboard]![txtStartTrend] And [Forms]![Report Switchboard]![txtEndTrend]

But the query does not work. Is the syntax correct? Both txtStartTrend and txtEndTrend are format Short Date.

Thanks for any Help


View Replies !   View Related
Positioning Text Boxes
Can anyone help please? Is there a way to position a Msg Box. Something like the MoveSize command maybe? I want a Message box to appear at bottom left of my form.

Thanks in anticipation.


View Replies !   View Related
Calculated Text Boxes
Lets say I have a form called form1 with 2 subforms named subform1 & subform2.

Can I place a text box on form1 that totals fields located on subform1 & subform2?

This is what I currently have as an expression in the text box. It is in the before update event, which may be the problem. Any ideas or solutions are much appreciated. :)


View Replies !   View Related
Locking Text Boxes
Hi guys,

I have a form that is opened when a user presses a button. Once the new form is opened a unique ID is passed across a put into a text box (which is invisible). The user then inputs some data and hits the enter button to assign the data to the person represented by the unique ID. However once the enter button has ben pressed the unique ID goes to zero - thereby preventing any more data for that person be entered. :-(

The code for the enter button is:

DoCmd.GoToRecord , , acNewRec

I trieds to locking the textbox but the unique ID is still removed...

is there anyway that I can prevent the unique ID from being removed?

View Replies !   View Related
Text Boxes - Need More Space

I have a text field for filling in details of a job description. I only need a brief suummary, but unfortunately I require more than the standard 255 characters.

Is there any way of doings this? I woudl like to be able to add the information to one box in my form as I am cutting and pasting the text from MS Word documents.


View Replies !   View Related
Text Boxes Behind A Sub Form
I wonder if anyone could help me here:

I have my main form that has a row of buttons at the top, some of these buttons have multiple functions so I have some hidden text boxes underneath that appear on the mouse move command, giving the impression of a drop down list for that button.

Just underneath the buttons I have a subform, the problem I have is that the text boxes will not show on top of the subform, they always appear behind it, is there anyway to get them to show on top of the subform ?

I hope this makes sense.



View Replies !   View Related
Arrays And Text Boxes
Is there anyway to name text boxes in an array format?

i.e. Text(1,23)

Or if not is there anyway to use VB to cycle through the text boxes

i = 1
Loop until i = 25
Text(i) = codehere
i = i + 1
Exit Loop


View Replies !   View Related
Form Help With Text Boxes

I have a form that displays fields from a table called "supp", e.g "name", "address 1" etc etc.

i want to if possible when i change the text on the form that is already in "name" field or regardless any text box field on the form, i.e "ab" to "cd" to display on the form that that specific record has been changed by putting the word changed with the current date into the table "supp". also if nothing has been changed that do not put changed and the date.


View Replies !   View Related

Copyright © 2005-08, All rights reserved