This might sound simple to everyone, but it won't work for me. I have a text box on my form that holds the current date, there are also other text boxes that hold other information. Here's what I'm trying to do, if the other text boxes are empty then I want the date text box to be invisible. Here's the code I'm trying to use:
Code:If [EquipmentType1]=" " Then[DateSigned].visible = FalseEnd IfEnd Sub
By the way this is triggered from the Form Load event. Thanks for any help you can provide.
I have a combobox on my form called TypeOfBusiness, with fields including Corporation, Education, Industry, Non-Profit. In order to make a second combobox called IndustryClassification appear when Industry is selected from the TypeOfBusiness combobox, I have used the following code:
Code: Private Sub Form_Current() If Me.TypeOfBusiness = "Industry" Then Me.IndustryClassification.Visible = True Else Me.IndustryClassification.Visible = False
[Code] .....
It works just fine. However, when a user selects both, say, Industry and Education, the IndustryClassification combobox will not appear. What code I can use to ensure the IndustryClassification box will appear regardless if another box is checked in addition to Industry? I am wondering if it has to do with the Column attribute.
I have a Main Form with a Sub-Form, the sub-form is base off a query. on the sub-form i have 8 controls, one of them is "Status' and "Process" and "Review" My Main Form have a Refresh command that refreshes the data in the sub-form.
What i am trying to do is make the "Process" Control only visible is "Status" is a certain status and "Review" visible if "Status" is something else. what i have done works correctly On Open. I run into and issue on the refresh command. I get Run-time error '2165' "You can't hide a control that has the focus"
Code: If Forms!Main_Form.[Name subform]!Status = "Ready" Then Forms!Main_Form.[Name subform]!Process.Visible = True Forms!Main_Form.[Name subform]!Review.Visible = False ElseIf Forms!Main_Form.[Name subform]!Status = "Reviewing" Then Forms!Main_Form.[Name subform]!Review.Visible = True Forms!Main_Form.[Name subform]!Process.Visible = False End If
I have done similar with a main form and making sub-form visible or not based on a control on a main form and that has worked perfectly. I am not sure how the control is getting focus and cause the error.
I have a form with four subforms set up in a tabs on the form. In the subforms I have a copuple of command buttons which enable/make visible fields when they are clicked (see previous posts but for eg) - if a height and a weight are added in two separate boxes a calculation is done and then a command button pressed to make visible the (label) which shows the mass index the patient falls into. My problem is that the label is then retained so if I click out of the form and re-enter with a new patient then the height and weight boxes are clear but the label from the previous patient remains.
I tried to put the code Private Sub Form_Load() If PtWeight = Null And PtHeight = Null And Text60 = Null Then Label106.Visible = False Label101.Visible = False Label177.Visible = False Label122.Visible = False Label123.Visible = False End If End Sub in both the open and on load event of the main form (not the subform) but it doesn't help. Any ideas?
(When should code be put on the main form and when on the subform?)
I have one field called "Tax", when I open the form, the "Tax" is invisible, when I click one button, then the "Tax" is visible, after the input the value, I want the "Tax" to be invisible. But it cannot be invisible.
Private Sub Tax AfterUpdate() [Tax].Visible = False End Sub
I created a little form containing informations the users need to see to insert the right values in other forms. I need to have this little form always visible even if the users are working with another form maximized. Does it exist a code to do it?
In my form, I have a combo box with one of three options (cash, check, reimbursement). If the user chooses check, I want a text box to become visible, so the user may input the check number.
I thought I could use another invisible text box to store the value of the combo box and then in the code put:
Private Sub Text64_AfterUpdate() If Text64 = "Check" Then Me.Check1.Visible = True Else Me.Check1.Visible = Refresh End If Me.Refresh End Sub
Text64 is holding the value of the combo box Check1 is the text box where I want the user to put the check number.
Hi could someone help me with the following please:
when a click on 'Button A' i want Button B, Button C and Button D (not yet visible) to appear. Then when i click on Button A again i want them to dissappear. Im sure this is easy!
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.
hey guys i was just wondering if anyone knew the code to make a table visible via changing a combo box. i know for a form its simply Form_formname.visible=True
I have tried searching a few threads, but can't get the answer or perhaps i'm tired. Anyway I have a YES/NO field and a command button. I want the button to be visible only if the yes field has been selected. No = invisible button.
i am trying to make my tab control visible, after i did it visible=false in the open form event. the problem is that the button that supposed to open the tab control is locates in a form and the tab control is located as a sub form. it doesnt recognize any version of writing that i am trying.
details: main form - "f_1" sub form - "f_2" the btn - btn1 (located in the main form) the tabctl - tblctrl1 (located in the sub form)
I have a form with a subform on it, if the user clicks a control on the subform I want to set the subforms visible property to = False.
I have tried Me!Subform.visible=False and Form!Subform.Visible=False but neither are working, I think i have to set focus back to the main form before I can set the visible property of the subform.
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.
Greetings. I have three forms that are open at the same time. They are related and cascading. The first form (frmEventAdd) is the anchor. Each event can have many Trials. The second form is frmTrialInfo. Each Trial can have three Classes. The third form is frmClassInfo. These forms are used for update and adding new records.
The user displays an event for update (frmEventAdd). Then clicks on a button to display the Trials for that event (opens frmTrialInfo). frmTrialInfo displays information for one Trial at a time. The user clicks on a button to display class information for that trial (frmClassInfo).
One of the fields on frmClassInfo is called cboJudge. It's a combobox with names of Judges (judges of dog competitions). The judge information in the combobox comes from two tables: tblPeople and tblJudges. If the user wants to add a new judge they may click on the btnNewJudge. btnNewJudge will open a form that is used to add a new person (frmPeople).
Because frmPeople is opened from many different points in the application, I found it easier to simply make the three, already opened, forms INVISIBLE. So...command button btnNewJudge opens frmPeople and makes frmEventAdd, frmTrialInfo, and frmClassInfo INVISIBLE.
When frmPeople is closed (btnClose), it checks to see if each of the previously opened/visible windows is open and then makes each VISIBLE, again. frmEventAdd and frmTrialInfo reappear just fine. However frmClassInfo does not.
I have traced the btnClose_Click routine in frmPeople and it certainly looks like every line of code is being hit, but the line that should make frmClassInfo visible does not do anything (nor does it generate any error).
Here is the code from btnClose_Click in frmPeople. Can you help me?
********************************************
Private Sub btnClose_Click() On Error GoTo Err_btnClose_Click
Dim blnEventAdd_Open As Boolean Dim blnTrialInfo_Open As Boolean Dim blnClassInfo_Open As Boolean
blnSecondChance = False
If blnDataChanged = True Then If DataHasChanged() = vbYes Then Call btnSave_Click End If End If
'================================================= ======================================= 'blnSecondChance=False = NO SECOND CHANCE ... Close this Form 'blnSecondChance=True = USER GETS A SECOND CHANCE ... Do NOT Close this Form '================================================= ======================================= If blnSecondChance = False Then 'Zero out Relative Record Number from Array svRecNo(intCallerIX) = 0 blnDoUpdate = False blnDataChanged = False DoCmd.Close acForm, Me.Name
'Is the frmEventAdd form open? blnEventAdd_Open = SysCmd(acSysCmdGetObjectState, acForm, "frmEventAdd") And _ acObjStateOpen
'Is the frmTrialInfo form open? blnTrialInfo_Open = SysCmd(acSysCmdGetObjectState, acForm, "frmTrialInfo") And _ acObjStateOpen
'Is the frmClassInfo form open? blnClassInfo_Open = SysCmd(acSysCmdGetObjectState, acForm, "frmClassInfo") And _ acObjStateOpen
If blnEventAdd_Open Or blnTrialInfo_Open Or blnClassInfo_Open Then If blnEventAdd_Open Then Forms("frmEventAdd").Visible = True Forms("frmEventAdd")!cboContact.Requery Forms("frmEventAdd")!cboSecretary.Requery End If
If blnTrialInfo_Open Then Forms("frmTrialInfo").Visible = True Forms("frmTrialInfo")!cboTrialRep.Requery End If
If blnClassInfo_Open Then Forms("frmClassInfo").Visible = True Forms("frmClassInfo")!cboJudge.Requery End If
intCallerIX = intCallerIX - 1 Else DoCmd.OpenForm PopCaller(), acNormal End If End If
Help - I have created a control button in a form using the wizard and in design view it is at the top underneath all the headings (in the form header) but when I go to normal view it is not there. I have checked the properties and it is down as visible yes display always and transparent no. I am now stumped as to why it's not there - any help appreciated!! :)
I was able to use coding for making controls visible or not in the attached database.
I have a main form with a tab control that has 3 tabs with subforms in them.
What I am not able to do is in the Tab Control I want the 3rd tab to be invisible and on the second tab where it says “May we go through the questions now?”, I have a check box. When that check box is checked I want the 3rd tab to become visible.
I am having problems figuring out this code to reference the Tab Control Page.
I'm trying to get a check box to be visible/enabled on Tuesdays, Thursdays and Sundays. I've been dabbling with the code and 'DatePart' but with little effect. I've been trying other suggestions on other threads but am still struggling I'm afraid. All help much appreciated, and I'm fairly new to access and have a large work objective to cope with, see below for my poor effort so far
Private Sub Datapulse_Enter()
If Datapulse = DatePart("1", "3", "5") Then Datapulse.Visible = False Else Datapulse.Visible = True End If
I have orders being entered, some of which may be in any one of several categories for which we need additional information. I would like to be able to have either a set of checkboxes answering the question "Check the appropriate box if the order is one of the following types" ... or ... have a radio-button selection where only one can be chosen at a time. That is important... that only one be able to be chosen at a time. It is possible to have orders outside this set of choices, and no selection made at all. Once the selection is made, I'd like either the appropriate fields to show in the main form... or ... have the appropriate subform show based on the entry from the checkboxes or radio selection.
I could have
OrderEntryForm containing checkboxes or radio selection for Type1, Type2, Type3 with the appropriate Type1fields, Type2fields, and Type3fields hidden until the right checkbox or radio button is selected.
or
OrderEntryForm containing checkboxes or radio selection for Type1, Type2, Type3 with the appropriate subforms Type1form, Type2form, and Type3form hidden until the right checkbox or radio button is selected.
There's only one problem: I have no idea how to make this happen... nor which way of doing this is best. Any help is GREATLY appreciated.
i created a form to work as a menu. At this point the menu has only one option (File) which is a text box. Once the user click on the text box FILE, a list box appears below, leting the user select between a few options. When the user clicked one of the options , a new forms comes (popup and modal in yes).
The problem is that when the second form is closed, the menu still has the list box visible. I would like to make it no visible but i dont know how.
I am receiving the following error while trying "get external data from Access to Excel". The purpose is to set up a pivot table from my access data. The error is as follows: "This data source contains no visible tables". Can anyone explain why I would recieve the error, when I have tables in my Access database? Thanks,
I am having a mare trying to do something which I think should be quite simple, as follows.
In a table I have the field [Entitled]. On my form I have this as a yes/no check box.
I have the following code in the VB.
Private Sub Check112_AfterUpdate() If Me![Check112] = True Then Me![Entitled].Visible = True (or I could use) Me![Entitled].Enabled = True Else Me![Entitled].Visible = False (or I could use) Me![Entitled].Enabled = False End If End Sub
Some people have the field checked and others do not.
The problem is; when I check or uncheck the box on individual records shown on the form, the value is remebered when I scroll to the next record (i.e. the box may be unchecked but the field is still visible/enabled). It is doing my head in! Help Please.
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