Forms :: Select Via Combobox - Make Numerous Controls Visible

Sep 18, 2013

I have a form where i select via a combo box if a product has been inspected, if it has, additional controls are then made visible.

If Me.Inspection_Completed = "Yes" Then
Me.Date_Inspection_Comp.Visible = True
Me.Date_Inspection_Comp = Me.Dateinsp
Me.Inspector.Visible = True
Me.Qty_Inspected.Visible = True
Me.OK.Visible = True

[Code] ....

I tried to put this in a function so i could call it on load, or on current etc, but cant seem to get it to work, apparently you cannot use the me. in a function.

View Replies


ADVERTISEMENT

Modules & VBA :: Make Controls Visible Or Not Visible?

Mar 24, 2015

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.

View 4 Replies View Related

Forms :: Visible / Non-visible Combobox - Column Attribute?

Oct 17, 2013

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.

View 14 Replies View Related

General :: Using Combobox Selection In IF Statement To Make Another Text Box Visible

Aug 28, 2012

I have a combobox [CBreason] that reads from a table to show me why someone is gaining access to the building.

One of the options is "Incident".

When incident is selected I want a textbox [TBIncidentNo] and a button[BIncidentDup] control I made to appear.

I thought that the code:

If Me.CBReason.Value = "Incident" Then
Me.CBIncidentNo.Visible = True
Me.BIncidentDup.Visible = True
Else
Me.CBIncidentNo.Visible = False
Me.BIncidentDup.Visible = False
End If

Placed in the after update action of the CBReason box would sufice but it doesnt work

I'm guessing the value is not recognised fro some reason but i cant work out why. There is no error message or issus, it makes the box dissapear when there is no entry but no change for selecting incident.

View 3 Replies View Related

Forms :: Make Visible When Field Is Not Empty

Oct 6, 2013

I've got a memo field on a form where the name is TextEXTRA

The Control Source for TextEXTRA is EXTRA.

I've got a box called BoxSHOW (Visible = No)

As I browse through records or find records, I want the box to become visible when there is something in the EXTRA field and become invisible when the EXTRA field is empty. This is what I've tried .....

Private Sub Form_Current()
If EXTRA Is Not Null Then
BoxSHOW.Visible = True
End If
End Sub

I tried many variations on the first line such as ...

Me.EXTRA "EXTRA" TextEXTRA

but I always get errors.

View 5 Replies View Related

Forms :: How To Make Combo Box Visible When Click On Label

Sep 28, 2014

i have a label and a combobox (the combobox is invisibile). in a form.

how do i make the combobox visibile when i click on the label?

View 2 Replies View Related

Forms :: Hide And Show Controls Based On Value In Combobox

Apr 22, 2014

I am using Access 2010. I wish to show or hide controls based on the value in the combobox. The combobox is bound with the data type Yes/No. If Yes, controls should be visible and if no, they are to be invisible. The database is a linked one. This selection should update all the users' forms.

View 2 Replies View Related

Forms :: Enabling Some Form Controls After Selecting From Combobox

Jan 27, 2014

I have combo box in a form. I want to enable (to highlight) some controls in the form after selecting any value from my combobox.

For example, There are three values in the combobox. And :

When I select value1, I want an unbound combobox1 to be enable (This combobox is synchronized with a bound combobox2). So when this unbound combo is enabled, its synchronized bound combo should also be enabled.

When I select value 2, it should do the similar action on a different unbound combobx3 (which is synchronized with a combobox4).

View 11 Replies View Related

Forms :: Make Non-printable Section For Controls On Form?

Jul 8, 2014

I want controls on the left of my form, but when I do it this way and then print a record, it displays a big blank section.

How do I make the left side a non-print section for my controls?

View 6 Replies View Related

Forms :: How To Make Navigation Controls On Main Form

Oct 18, 2013

how do you make the navigation controls on the main form control the subform i.e. navigating through the records or creating a new record???

View 2 Replies View Related

Forms :: Create Rectangle Covering Only Desired Controls And Then Make Back Colour Light Gray

Apr 15, 2015

A2010 - on an existing form I have a few controls that I want to hightlight. I thought I would create a rectangle covering only the desired controls and then make the back colour a light grey. But if I do then I cannot see the controls. If I change the back style to transparent then the colour reverts to nothing and I'm back to square one.

It feels like I want to bring the existing controls to the font - but how?If I create new controls on an existing grey rectangle then it works fine.

View 10 Replies View Related

Forms :: Make Listbox Visible After Selection Of Another Listbox

Oct 23, 2013

Okay then, after much trouble and confusion, I finally realized I need to use an Extended listbox in order to allow for multiple items to be selected from a list on my form (rather than the evil multiple selection combobox!).

However, now I am trying to figure out how to make one listbox (IndustryClassification) only be visible if the item "Industry" is selected in another listbox (TypeOfBusiness). Coding I can use for this in the AfterUpdate event of the listbox?

View 7 Replies View Related

Copying Numerous Forms/queries/reports

Jan 10, 2005

I have a problem that is very tedious. I have 9 separate copies of the same databse (there is a copy of each database for every branch of my company. Each database has small custom features that show what company it belongs to) i was told to make a new feature, and in the making, i had to make 40 new queries, 12 new forms 8 new macros, 12 new macros and 6 new forms. this feature needs to go into all of the databases. As far as i know, im going to need to copy and paste each individual query,form, macro and form. Thats 72 different things i will have to copy and paste into 9 separate databases. Does access provide an easier way to go about this?
any help?

View 4 Replies View Related

Forms :: Combobox In Navigation Form - No Longer Select A Value

Apr 26, 2014

The combobox in the frmResellerOrders works correctly until I include it in the Navigation form frmMainMenu. Once I include it the navigation form it no longer lets me select a value. I have read numerous articles about using the
Forms!YourMainFormName.YourSubformContainerName.Form.YourControlName

However, none of these seem to mention when and where to use it. Do I put it in the query that the form is linked with or do I need to put it in my form somewhere? I have been trying to fix this off and on for over a week now. It is one of the last parts of my database that I need to get finished by Monday!

I have attached a copy of part of my database with some dummy data.

View 2 Replies View Related

Forms :: How To Get Two Different Fields To Autopopulate When Select A Choice From Combobox

Jan 10, 2014

I am trying to get two different fields to autopopulate when I select a choice from a combo-box on my form.

I have a form called IncomeRcvdFrom, which takes its fields from the table "IncomeRcvd"

In the form, I have three fields that need to relate to each other and auto populate.

The first field is called "IncmType", which comes from a different table called "CategoriesList". There is another field called "IncmDescr" which also comes from the same table. The third field, called "Category" is a list box in that table that comes from another table called "CatType".

All three of these fields also are list boxes in the table "IncomeRcvd", where the source of these fields come from the "CategoriesList" and the "CatType" tables.

What I am trying to accomplish is so when someone selects an Account, or "IncmType", it auto populates the "IncmDescr" field, as well as the "CatType" field on the form.

So far, I have gotten the Account or IncmType and the IncmDescr fields to autopopulate each other, but the Category field either says "Name?", or I get the "type mismatch expression" error message. I also accidentally got the field to work one time, but it would only display the ID Key field and not the actual wording in the rows (i.e. Misc. Payment, Royalty, Rebilling, etc.)

I have checked my relationships, my control sources, and still can't get it to work.

View 7 Replies View Related

Forms :: Populate Field When Select A Value From Combobox On The Form

Apr 24, 2013

In my quality control database QC techs will be entering in test results. Each quality control entry they put in will have a product and lot number it is related too.

My question is about making data entry easier for the QC techs. When two jobs are being run at once, the techs may have to alternate between which jobs they enter, meaning a different product and lot number. It would be frustrating for the QC techs to enter in a product code and lot number for every entry they make.

Can the lot number field be automatically populated when the tech selects a product? Basically, if the tech selects product A, can the last lot number value for product A automatically populate the field in the new entry?

Edit: Currently I have the "solution" of making two instances of the entry form with each lot number entered on the different one. This allows the QC Techs to use the CTRL+ ' to populate the last record, allowing them to quickly enter the product code, lot number, and date of the job they are working on.

View 3 Replies View Related

Forms :: Using ComboBox To Look-up A Multivalued Field And Select Items In Listbox?

Jul 21, 2014

I'm creating a Form called Pharmacy where I can select a [Diagnosis] from a combo box in the form. This combo box source references a table called tblDiagnosis where each Diagnosis also has a multi-valued field called [Indications].

The Pharmacy form also has a multi-select listbox with all possible Indications. I would like to write a VBA code such that when a Diagnosis is selected, the Indications for that Diagnosis are automatically selected/highlighted in the listbox on the form as well.

As such, by selecting a Diagnosis, all the indications attached to that Diagnosis will automatically be selected; however, if additional indications are needed, they can still be selected afterward.

I know that there is a function Me!Listbox.Selected(i) = True, where i is the row of the entry in the listbox. However, the i in the listbox does not correspond to the ID of the Indication. I think that if there is a way to select listbox items by name, that would be much more efficient.

The reason I have a listbox, is because this listbox of Indications then references another table called tblDrugs where all drugs that are approved for the selected indications selected are filtered and displayed.

View 1 Replies View Related

How To Make Tables Visible

Apr 6, 2007

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

View 2 Replies View Related

Make A Button Visible??!!

Feb 21, 2005

Hi,

What is the code for the following problem that am I having:

When I click on a button (button1) then I want to make another button (button2) visible.

Thanks for your help in advance!!

Paul.

View 5 Replies View Related

Make Tabctl Visible

May 29, 2005

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)

please advice

View 1 Replies View Related

Can't Make Form Visible, Again

Sep 20, 2005

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

Exit_btnClose_Click:
Exit Sub

Err_btnClose_Click:
Call ShowError("frmPeople", "btnClose_Click", Err.Number, Err.Description)
Resume Exit_btnClose_Click

End Sub

******************************************
Regards,
SueB

View 3 Replies View Related

Make Only One Of Several Subforms Visible

Apr 27, 2006

Hello all.

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.

Tom

View 3 Replies View Related

Make Field On Subform Not Visible

Mar 17, 2005

I have a form with a subform. I would like to make a field on the subform not visible if a field on the primary field is null. Can anyone help? Thanks.

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

Modules & VBA :: How To Make Access Visible

Apr 27, 2014

From Excel, I open a database and start a macro with the following:

Set oApp = CreateObject("Access.Application")
oApp.Visible = False
oApp.OpenCurrentDatabase db, True
oApp.DoCmd.RunMacro "Import_Data"

With the macro running and Access not visible, how can I make the database visible if an error occurs in the macro? Currently, if an error occurs in the macro, a 'Msgbox' message is generated (by the database macro). But with Access not visible and Excel visible, the process cannot continue unless the user knows to click on the 'Microsoft Access' icon in the task bar to bring Access to foreground and acknowledge the 'Msgbox' message.

I'd like to activate the Access window from within the database macro.

View 3 Replies View Related

Modules & VBA :: Change Which Row In Combobox Is Visible Depending On Event

May 21, 2015

I have a combo box with three columns, the first one is the bound one, the second is text in English, and the third is text in Spanish. Currently when the form is open, both the English and Spanish texts columns are visible. What I would like to do is set up a command button on a different form that will open the form with just the English showing in the combo boxes, and another button for Spanish. I've tried the following code which opens the form, but the combo box is disabled altogether.

DoCmd.OpenForm "frmEditar", acNormal, "", "", , acNormal
DoCmd.SetProperty "niv_gest", acPropertyColumnWidths, "0;1;1"

What am I missing?

View 5 Replies View Related







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