Should Be Easy - Visible/hidden Text Boxes

Oct 6, 2004

Hi Everyone, This should be quite easy,

I have 20 text boxes in a form
Dependent on the ammount of people attending [number in Group] text box
I am trying to make the same amont of [Client#] text boxes visible

The below coding works but i cannot go any further than 1 and 2 attending, As the if and else statement cannot be continued

Im sure there is an easy way to do this -

Private Sub C_AfterUpdate()
If [Number in Group].Value = 1 Then
[Client 1].Visible = True
[Client 2].Visible = False
[Client 3].Visible = False
[Client 4].Visible = False
[Client 5].Visible = False
[Client 6].Visible = False
[Client 7].Visible = False
[Client 8].Visible = False
[Client 9].Visible = False
[Client 10].Visible = False
[Client 11].Visible = False
[Client 12].Visible = False
[Client 13].Visible = False
[Client 14].Visible = False
[Client 15].Visible = False
[Client 16].Visible = False
[Client 17].Visible = False
[Client 18].Visible = False
[Client 19].Visible = False
[Client 20].Visible = False

Else

[Number in Group].Value = 2
[Client 1].Visible = True
[Client 2].Visible = True
[Client 3].Visible = False
[Client 4].Visible = False
[Client 5].Visible = False
[Client 6].Visible = False
[Client 7].Visible = False
[Client 8].Visible = False
[Client 9].Visible = False
[Client 10].Visible = False
[Client 11].Visible = False
[Client 12].Visible = False
[Client 13].Visible = False
[Client 14].Visible = False
[Client 15].Visible = False
[Client 16].Visible = False
[Client 17].Visible = False
[Client 18].Visible = False
[Client 19].Visible = False
[Client 20].Visible = False
End If
End Sub


Thank you. AM

View Replies


ADVERTISEMENT

Visible Text Boxes

Jul 31, 2005

I have a db I use for maintenance of equipment. I use a main form that has the equipment listed and a sub for for spare parts and linked by equip #. In the sub form I want to turn the visiblity of a specific text box turned on based on what is in a keyword textbox field in the sub form. What syntax would be the best to use and where do I put it. Have used if me.keyword = motor then me.hp.visible = true and also tried a case statement

View 6 Replies View Related

Field Data Not Visible / Hidden

Aug 22, 2014

I have 30 fields on a form that houses codes that are 1 to 2 digits in length. Some of those codes are used way more often than others so I decided to build a VBA script to apply the most common codes to the fields based on entry in 3 other fields and applied to a button. The code works great but one of the fields (the 6th one) is behaving oddly. I have tried multiple criteria for code and it is ONLY the 6th field being the pain. The code is applied to the field but it is invisible until that field gains focus by either clicking on it or tabbing to it. I checked the fields format to others of the 30 and all of the settings are exactly the same. There is not anything set in any of the events and there is not any other code pointing at those fields.

View 3 Replies View Related

Hidden Boxes

Apr 22, 2008

Is there any way to keep a combo box hidden until the combo box above it has been selected.
Basically I have the user choose a week number from combo box 1 and want to keep combo box 2 with a different list hidden until combo box 1 has been selected.
Sorry if this sounds mixed up but its the best way i can describe the problem

Thanks in advance

View 3 Replies View Related

How To Print Hidden Form Using Visible Form Only - MS Access 1 Table And 2 Forms

Nov 24, 2014

I have a Lost/Found property database which we use to keep record of the lost/found property and it is working fine.

As per our organization's policy, we keep the item(s) for up to three months in which if it gets restored to the owner then fair enough otherwise after three months the item(s) can be claimed by the "Finder". But for this very purpose we issue the Finder with a "Claim Receipt" which he/she should bring in when claiming for the item(s) after three months period. Therefore, It's just the right time to upgrade the database to a more professional level.

The database has one table and two forms.

One form (LostFoundForm) is visible to the user in which they enter data, this form has two sections; Item(s) & Finder's details and the second section is about Restoring details.

However the second form (ClaimReceiptForm) is hidden to the users (for manual data entry) and has only one section which is exactly the same as the first form's first section, i.e., Item(s) & Finder's details. This second form takes the data automatically from the first form because the table behind them is same and fields are same (please see attachment). Up to here it's all working fine.

I would like to introduce a Checkbox or a CommandButton in the LostFoundForm which when we click should pull up a msgbox asking "Do you want to print the receipt for this item(s)?" with a Yes/No option. On clicking "No" it should, obviously, settle down but on clicking "Yes" it should print the "corresponding record" from the ClaimReceiptForm.

View 3 Replies View Related

Option Boxes - Making Items Visible

Sep 21, 2004

i want the user to make a selection from one of two option boxes, with the choice that they make i want a list box to appear straight away, depending on there selection, can anyone help please.

Cheers

Andy

View 6 Replies View Related

Queries :: Format Field As Password Or Hidden Text

May 22, 2014

I have a query that I am sending as a spreadsheet to various service technicians listing parts that they need to take inventory of. Then, after they take the inventory, they send the spreadsheet back to me and I upload their counts back into my database. Right now, my query contains the Bin number, part number, part description, and a blank column for the technician's count. I have just learned, that the company does not want the Bin number to be visible in the report. In order to upload the technician counts into the database when they return the spreadsheet, I need to be able to reference the Bin number to get the count on the right line.

Is there something that I can do so that the Bin number will be visible in the report when the database reads it, but not to the technician?

The only solution I could think of was to format the Bin Number as a password. Unfortunately, I can't get that to work in the query results. If I save the bin number as a password in the table, is there a way to make it visible on reports for internal use (so the people in headquarters who are responsible for over all inventory can still see each bin number)? I found how to hide the field in the query results. However, when I send the results to the technician, the field is not there at all.

View 5 Replies View Related

Forms :: Populate Hidden Text Field Of A Form From Datasheet

May 17, 2013

I have a form with a button that pops up a datasheet with a number of records. I need the dbl click event to populate a hidden text field with the id of the item that was double clicked.

Ive found the double click even and can get the double click to close the window, but i need to populate the text field as well.

View 1 Replies View Related

Visible Text

Feb 26, 2006

Hello. In my table there is a checkbox column. This box is checked on a form which feeds the table. I run reports from queries which contain both checked results as well as unchecked results. Is it possible for on the report, for the text (the field name, not the checkbox) to only appear when the box is checked? I hope I'm explaining this properly. I want the checkbox title to only appear on the report when the box is checked, otherwise I don't want it visible.

Thanks for your help.

View 6 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

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

Making Text Visible

Aug 18, 2005

got 2 radiobuttons and i want the text further down the page to show or not show depending on the value on the radio buttons.

I have tryed making an IF, but it doesnt want to update when i change post, or when i start the form, the radio button get the correct button according to the table but the text wont show any way untill i reclick the radiobutton.
dont know if u got what i ment but if u didnt ill try to explain it more.

View 8 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

Make A Text Box Visible On Cmd Button

Aug 27, 2006

Hi, I have a form with a INFO button, what I need is when the info button is pressed a text box becomes visible on the form and when pressed again the text box become not visible, this will allow the final user the have additional information regading compiling the form etc!
Thanks
Marco

View 5 Replies View Related

Visible / Invisible Text Field

Jan 19, 2006

on a report that has 2 pages, how can I make a text box in the bottom of the report page 1 invisible, but visible on page 2

you help will be much appreciated

Jabez

View 7 Replies View Related

Can Selecting A Combo Box Make A Text Box Visible Again

Sep 29, 2005

Hi,
Is it possible when choosing a combo box to have it make a text box visible, when in this text boxes properties you've chosen visible=NO. Can an event procedure or some code be written that will make visible=YES.

Thanks any help with be greatly appreciated

View 1 Replies View Related

Can Selecting A Combo Box Make A Text Box Visible Again?

Sep 30, 2005

Hi,
Is it possible when choosing a combo box to have it make a text box visible, when in this text boxes properties you've chosen visible=NO. Can an event procedure or some code be written that will make visible=YES.

Thanks any help with be greatly appreciated

View 1 Replies View Related

Forms :: Checkbox Be Visible Only If A Textbox Has Text In It

Jun 12, 2014

I would like to have a checkbox be visible only if a textbox (Text246) has text in it.

Code:

Private Sub Text246_AfterUpdate()
Me.Check275.Visible = Text246
End Sub

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

Reports :: Text Label Conditionally Visible On Report?

Dec 31, 2013

I'm running Access 2003 and my question relates to delivery notes that are produced for drivers as reports. These delivery notes have a blank payment box for the driver to complete if the customer pays upon delivery.

As more and more customers are prepaying by credit cards, I'd like this payment box to be automatically filled with a "PAID" text which will let the driver know the order has already been paid for.

The delivery note is produced from an "Orders" table which has a "Paid" field whose value is automatically set to "Yes" when the order has been paid for.

I was hoping to be able to place a "PAID" label on the report which is only visible when the Paid field of the underlying query is Yes.

As things are at the moment I cannot see any way to put any conditional statement onto this Text/Label. The only options for the "Is Visible" property of the text are Yes or No.

View 4 Replies View Related

General :: Text / Formatting Not Visible When Form Open

Aug 29, 2012

When loading a form often some of the text is missing, headers are not there and/or the colours for the background are simple white, until I either resize the form or scroll up and down a few times.

View 1 Replies View Related

Reports :: How To Make Label Visible Depending On Text Box Value

Jul 27, 2014

I have a report that displays on a continuous style report. What courses the employee have been on and when they expire

right I have field call expirydate and another call dayover showing the number of days till that course has expired also I have made a label called Expired1

now what I'm trying to do.....

if the expirydate has passed I want the expired1 label to be visible and dayover field to become invisible

I have tried

Code:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If Me.Expirydate < Date Then
Me.expired1.Visible = True
Me.DaysOver.Visible = False
End If
If Me.Expirydate > Date Then
Me.expired1.Value = False
Me.DaysOver.Value = True
End If

I have also tried the code on current event on the report

now my problem if one of the course has expired it will show the label called Expired1 but on all the records but I only want it to display on the record that has expired and leave the daysover text box visible if course has not expired

View 7 Replies View Related

Want Check Box On Switchboard Form To Set A Text Box's Visible Property In A Report

Sep 23, 2004

On my switchboard form, I have a check box which the user can check to make a text box (which appears in several different reports) visible and uncheck to make it invisible. The text box in the reports has the same name on all of them.

I am having trouble making this work.

I can think of two solutions, but haven't had success with either yet.

1. I could simply change the visible property of the report(s) control from the form. This works if the report is open, but throws an error if the report is not open.

Code:Public Sub showNumOrgsInReportCB_AfterUpdate()If Me!showNumOrgsInReportCB.Value = 0 ThenReports![publishZipR]![numOrgsF].Visible = FalseElseReports![publishZipR]![numOrgsF].Visible = TrueEnd IfEnd Sub

Is there a property or function I can use to test whether the report is open before I set the text box visibility?


2. Alternatively, a less elegant solution would be to run an event procedure to close all open reports. This would eliminate that issue, but I haven't gotten the code to work yet:

Code:Public Sub showNumOrgsInReportCB_AfterUpdate() Dim rpt As Report ' Enumerate Reports collection.For Each rpt In ReportsDoCmd.Close rpt.nameNext rptEnd Sub

This line:
DoCmd.Close rpt.name
throws a Run-time Error '13', Type mismatch.

How do I fix that?


I'm open to better ideas!

Thanks

View 2 Replies View Related







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