Control Array In Access / Text Boxes As Objects

Apr 13, 2005

Hi,

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?

Thanks

Frozbie

View Replies


ADVERTISEMENT

Access 2007 Control Array

May 5, 2007

Anyone know if Access 2007 has control arrays or some thing similar?
Thanks

View 7 Replies View Related

Forms :: Rich Text Box - Dynamically Populate Control With Embedded Objects At Run Time

Mar 29, 2015

From a info sheet on RTB Using the Add, Clear, and Remove methods, you can dynamically populate the control with embedded objects at run time. Can those 'embedded objects' be controls, e.g. list boxes, labels etc ?

View 3 Replies View Related

Forms :: VBA Calendar Control With Two Text Boxes

May 14, 2013

I want the calendar to show the date in the field [Next Payment Due] - whenever this value changes, the calendar date should change accordingly.

I want the calendar to be assigned to a text box (txtCalDate), so this would also contain the date of [Next Payment Due].

However, If the calendar date is changed (on the calendar), I want txtCalDate to show this date, but [Next Payment Due] to stay as it's original value. Next Payment Due can only change the value, but not be changed itself.

So I presume VBA would be needed to say when [Next Payment Due] is changed, make calendar this date. And then to simply assign the calendar to txtCalDate so if calendar is changed, this will change with the new date.

View 3 Replies View Related

Text Boxes Control Source = Calculation Can't Save Sum

Oct 7, 2005

Hello,
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 1 Replies View Related

Forms :: Simple Combo Boxes Causes Objects To Flicker?

Oct 17, 2013

I am building a simple form with a few Combo Boxes, text boxes and a picture. When two out of the three Combo boxes updates a few text boxes, labels but not all and the picture flikers/blink. I do have one other combo box that does not cause anything to flicker once it updates. This is getting annoying and it makes my form look unprofessional I do not have any vba or macros running yet on the form - I have tried different ways to creat the form IE. Form Wizard and Blank Design. I used the Look up wizard for creating the text boxes/ Combo boxes in the database.

The other thing I noticed is that when in design view the same objects blinks when I scroll up or down loger than the other objects.

I did search this site and the web but did not find anything that did not metion VBA code and the Echo on/off.

Access 2010
Windows 7

View 10 Replies View Related

Copying Objects From Plain Form To Tab Control

Oct 30, 2006

Hi,

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 3 Replies View Related

Access Control Source For Text Box

Apr 8, 2007

hi,

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?

Thanks.
Trevor.

View 2 Replies View Related

If Some Text Boxes Empty Dont Allow Other Fields Access

Jul 27, 2005

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 2 Replies View Related

General :: Auto Populated Text Boxes To Display Rows From Combo Boxes

Jan 25, 2015

I have strange issue when creating auto populated text boxes which displays rows from combo boxes.

In one database auto populates works with simple text box Control Source edit "=[ComboName].[Column](NumberOfColumn)".

Somehow same method doesn't wotk in different database: here one time I have to insert VBA code at On change Event:

Me.TextBoxName = Me.ComboName.Column(NumberOfColumn)

And other time it wont work with On change but only with After Update Event (code is same).

Another thing this morning happens was that when I tried to add new record trough form where combo box and tex boxes are located, MS Office suddenly stopped working after selecting combo box selection (with message Microsoft Office has Stopped Working). It is 2013 version.

I got it work after deleting and re-inserting VBA code to autopopulate text box at After Update Event.

View 3 Replies View Related

Forms :: Database With 3 Tables - Linking Combo Boxes And Text Boxes

Jul 29, 2015

I currently have 3 tables within a database with student details of three different classes. I need to create a user form that has a dropdown box which I can select a student from one of these tables with a number of text boxes below which brings up all the students details, then once the student has been selected and the correct details are shown then I need to create a button which allows me to move that student from one table to another.

View 4 Replies View Related

Queries :: Multiple Combo Boxes And Text Boxes On A Search Form

Mar 24, 2014

I'm trying to build an database for aircraft operators. I've got the basic tables structure and relationships but I'm stuck on building an search form to filter records by user input.I've got following controls on my form (unbound):

1. AircraftType (combo box) from tblAircrafts
2. CompanyName (combo box) from tblListOfAircraftsOperators
3. TeailNumber (text box) from tblAircraftOperators
4. AirportNameSearch (combo box) from tblAirports
5. PassengersNumber (text box) from tblAircraftOperators
6. ManufactureYear (text box) from tblAircraftOperators
7. SourceSearch (combo box) from tblInfoSource
8. CountrySearch (combo box) from tblCountry
9. CategorySearch (combo box) from tblAircraftCategory
10. EamilToOperator (text box) from tblAircraftOperators
11. InteriorPhoto (Bound object frame) from tblAircraftOperators
12. ExteriorPhot (bound object frame) from AircraftOperators

I need to enable users to search for aircrafts based on those criteria. As I mentioned I'm new to Access and I don't have any advanced coding skills. I have a query build to perform the search and this is the code I've managed to write so far:

SELECT AircraftOperators.RegistrationNumber, AircraftOperators.PassengersNumber, AircraftOperators.ManufactureYear, AircraftOperators.EmailToOperator, AircraftOperators.ExteriorPhoto, AircraftOperators.InteriorPhoto, tblListOfAircraftOperators.OpratorName, tblAircrafts.AircraftType
FROM tblAircrafts INNER JOIN (tblAirports INNER JOIN (AircraftOperators INNER JOIN tblListOfAircraftOperators ON AircraftOperators.CompanyName =

[code]....

View 2 Replies View Related

Modules & VBA :: Define And Setup Array - Find Respective Numbers For A Text String

Apr 21, 2015

I need to find the respective numbers for a textstring when for

abcdefghijkl stand the numbers
79 81 82 83 84 85 86 87 88 89 91 92

The textstring to "decode" is for example is 'adgjk'

The result (79 83 86 89 91) should be added into a table by Looping.

rs.Addnew
rs("Letter")= myarray??
rs("corNumber")= myarray?
rs.update
rs.movenext

Something like this.

But I cannot define and Setup the Array, which should be the best way for doing this.

The Array does not change its Content nor its Dimension.

Both, letters and numbers are strings.

View 14 Replies View Related

Forms :: Changing Multiple Text Boxes To Combo Boxes?

Mar 14, 2014

there is a way to convert multiple text boxes to combo boxes all at once, rather than right clicking on them one at a time, and selecting Change to.

I have a form with about 50 fields and most of them need to be converted to combo boxes. I'd always done it manually one at a time up to this point, but I'm trying to build up my learning and look for smarter ways to do things.

View 4 Replies View Related

Forms +List Boxes +Text Boxes With Formulas

Nov 8, 2004

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.

Thanks,

Lester

View 3 Replies View Related

Locking User Access To Database Objects (MS Access 2000 And 2003)

Apr 15, 2007

I have two database applications and they are:
- the (A) application is for administration use.
- the (B) application is for normal users use.

the idea is that: I made the (A) application for administrators who have full control over the database objects (tables, forms, queries, and so on ...).

the (B) application I have created for normal users who will have only to use forms to insert some data and display data only.

but the two applications has a respective table called "vacation request" table. where I linked them, so the both administrators and users can share the data.

The real question is that: How can I prevent the users from seeing the database objects in their application. I used the database options which have helped me in hidding the database objectives when the users open the application, but unfortunately they managed to access to the database objects by pressing the special keys.

I would like to have an access to the (B) application when I want to make some modifications to the forms and then lock it from users where they only have to use the forms for requesting vacations and view the vacations.

View 1 Replies View Related

Clearing Text Boxes/combo Boxes?

Feb 24, 2005

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,

Paul.

View 2 Replies View Related

New Text Boxes And Check Boxes Don't Work

Apr 24, 2008

Hi,
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 4 Replies View Related

Storing Array Values In Access

Aug 2, 2007

Hello,

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?

Cheers,


trufla

View 2 Replies View Related

Need Some Help With OLE Access Objects

Feb 13, 2004

I was wondering is anyone could help me with a problem thats been vexing me all day..

I have an Access database that has a number of Word documents stored as OLE objects. What I need to do now is create a macro within Word which, based on a few parameters, retreives these Word Docs from access and formats them into a completed document. The ordering and formating bits fine, where I'm stuck is getting at the OLE objects.

Can anyone give any advice on a possible solution?

Thanks, D

View 2 Replies View Related

Access Objects Within A 2nd Database

Jan 4, 2006

Any ideas on how I can get a list of the names of the queries and tables within a different database?

For example, from db1 I want to get a list of the names of the queries and tables within db2.

Thanks!

View 3 Replies View Related

Updating Objects In Another Access DB

Sep 25, 2004

I am doing bug and enhancement development for an existing Access Application.

Periodically (after testing) I need to take my changed objects and export them to the production database.

My problems are:
1. Is there any easy way to tell which objects have been changed (is there any flag I can set at the beginning of a development cycle and then check to see which objects have been changed)

2. When exporting these objects they don't replace the existing objects in the Production Database they add a new object with the number "1" appended. If there was a form called "fCustomer Input" I end up with a new form called "fCustomer Input1"

This problem must come up with other development efforts.

Help

Thanks

View 2 Replies View Related

Combo Boxes / Text Boxes

Apr 29, 2005

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 2 Replies View Related

Check Boxes And Text Boxes

Jun 9, 2005

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 3 Replies View Related

Combo Boxes And Text Boxes

Jul 12, 2006

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 4 Replies View Related

Batch Deleating Of Access Objects

Nov 17, 2004

I need to update a number of copies of the same application in different locations.

To do this I need to import new objects (ie. 10 forms, 3 queries, 5 macros etc.).

This takes two steps:
1. Delete the objects in the old DB
2. Import the objects into the odl DB from a temp DB that contains the new objects.

Is there any way to batch delete a bunch of objects? Otherwise I have the chance of missing an object and have the import create a replacement object (ie. fUpdateForm1) with the numbver 1,2 3 etc appended.

I can't just swap out the old database and replace it with a new database, and I already have my data linked from anther DB.

Thanks
Mike Lester

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved