Enable Tab Controls On Form Open

Apr 20, 2005

I want to disable a tab control page when a form is open, and enable some of the fields if a check box is checked, and some others if another check box is enabled

Can anyone help.

Paul R

View Replies


ADVERTISEMENT

Enable/disable All Controls On Form

Jan 10, 2008

Hello. I have a form with a million little buttons on it (don't get me started, I didn't design it! - heh)...

Depending upon which user is running the mdb, I would like all but 16 (of the 80 or so) objects/controls disabled/enabled. I would like to autodisable all the controls, then enable the subset (or all of them) depending who the current user is.

SO in short, other than individually disabling/enabling the many items, is there a magic command for vba, similar to enable *.* for controls [silly e.g., but I hope you get my point...]

Thoughts!

Thanks!
-madEG

View 2 Replies View Related

Listing Controls On Open Form

Apr 15, 2006

Dear Friends

How do I list al the controls on an open form including mutiple subforms

Please advice

View 6 Replies View Related

General :: List All Open Databases - Referring To Controls On A Form

Jul 17, 2013

Any way to list all currently opened Access databases? It feels like this must be possible by referring to the databases collection, but I just don't know how.

Also, is it possible to refer to controls on a form in one open database from code in another database? (and obviously if so, how?)

View 2 Replies View Related

Modules & VBA :: Main Form On Open Event To Show Tabbed Controls Only If There Is Data

Jul 24, 2013

I have a report that tracks scores for our employees. From the report, you can click a button to add a new score in a form or edit an existing score(frmscoretracker). On this form there are two subforms, in a tabbed control to track additional information about the score; what areas were marked down(Trends), and was it a failing score(AutoFail).

When this form opens I have it programmed to only show the subform if there is data in it. The goal being, if I am adding a new score and there is no existing trends or Autofails for this new record, neither subforms will show - I will add an after update even to show either trends or autofail depending on the score recorded. Also, if someone chooses to edit the score, whatever subform with data, will show as well.

When someone clicks to add a new score, opening this main form to a new record, both of the tabs show. However, if the form opens to an existing record, the appropriate tab shows. Here is the code

Code:

Private Sub Form_Open(Cancel As Integer)
'If the subform has a record, the tab is visible, if not, the tab is not visible
If Me.frmtrends.Form.Recordset.RecordCount > 0 Or IsNull(Me.Trends) Then
Me.Trends.Visible = True
Me.TabCtl33.Visible = True
Else
Me.Trends.Visible = False
End If

[code]...

Both tabs are set as not visible in the default settings. Is there something in this code that is triggering then to be visible when there is no record in the main form?

View 4 Replies View Related

Enable Mousewheel In A Form

Apr 27, 2006

Hi guys!

Got a small problem. I got a big Access-form (big of size) but a small computerscreen before me. I am very much used to scroll up and down with my mousewheel.

However, when I open my file and the opening-form pops up I cannot scroll up-and-down the form using my mousewheel.

Is there a VBA-code or whatsoever which can enable the mousewheel???

I tried to find the answer in earlier discussions, but I found only discussions where the topic was about disabling the mousewheel. I want to ENable it.

Does anyone has a clou?

Many thanks, cheers,
Willem

View 1 Replies View Related

Form Control .Enable ....help

Jun 9, 2006

Sorry to bother everyone with something that is probably real simple....

I would like to disable one control if another does not equal a certain value.

Do I set the control to enable=No and then use OnCurrent and afterupdate?

As always, I am confused and could use some assistance.

Tim E.

View 2 Replies View Related

Enable And / Or On Custom Search Form

Jun 9, 2014

I've created a custom search form where using unbound text boxes and combo boxes I enter the criteria for a query. I would like to enhance my form to allow "and" and "or" searches on a field. For example, a product on my database has multiple features. I would like to search for products who have "feature1 and feature 2" or "feature1 or feature2". {Note: The table, Product is connected to table, Features using table, LineItem_ProdFeature where there are multiple records in Features for one record in Product}

Right now, the search form has a combo box that lists all product features. The user selects a feature and runs the query. All products with that feature are listed in the query.

It would be so great if the user could choose multiple features from the combo box. Then the query would return all products that have all of the selected features ("and" search). It would be just awesome if the user could select multiple features, and specify if they want an "and" or "or" search of those features.

View 14 Replies View Related

How To Enable Users To Use Wildcards In Their Searches On A Form

Jul 22, 2013

I have a Excel spreadsheet with an embedded query that pulls from an Access table. The users use a spreadsheet with an embedded query to search on a field called "Circuit ID", to bring up results showing the history of a given circuit id. Currently they have to enter an exact match, for example if the circuit id value is DHECHUIOY, they need to enter this exact value DHECHUIOY. They want instead to be able to enter DHEC and a wildcard character to bring back every value that begins with DHEC. There doesn't seem to be a way to do this in a spreadsheet with an embedded query.

I finally decided that it would be easier to create a form in Access

How I can create a form which allows users to search on a value using wildcard characters ? (the user enters the wildcard character).

I'm on Access 2012, Windows Vista

View 1 Replies View Related

Un-enable Buttons On Subform When Main Form Loads

Jun 19, 2006

I did a search in the form forum and couldn't find anything close that had a response.

I have a parent form and a sub form.

I have the parent set up to make the enable property false for the command buttons that aren't appropriate when you first open the form: Like Save and Undo.

I want to do the same for the child form, which has different data linked to the parent form.

The parent form always grays out the inappropriate boxes.

The subform will gray them out only if I open it as a stand-alone form. When I put the code in the Open, or Load or Gotfocus events I get an error message that it cannot locate the subform.

Any ideas where to go?

Thanks-

View 2 Replies View Related

Forms :: Enable / Disable Checkbox On Continuous Form

Apr 5, 2015

I am asked to create a checklist for a number of tasks to be executed in a particular shift. However in some tasks can be skipped. There are three shifts per day.

To accomplish this i have created a continious form with a number of checkboxes per task which represent the days of the week. The tasks itself are stored in a seperate table with a checkbox per shift (task settings). If the tasks must be performed in a particular shift, the checkbox is activated (= true).

Goal here is, if a task doesn't have to be executed in a shift the task should not be visible on the continious form. The recordsource of the continuous form is a query, which contains a join between the table with the task settings and the table with the tasks performed.

I have placed some code to perform the task in the form's current event

In the continuous form current event I have placed for every checkbox the following code:

Private Sub Form_Current()
If Me. PerformTaskShift.Value = True Then
Me.MaandagOchtend.Enabled = False
End If
End Sub

However when i execute the code and load the form, not only the checkbox in the row mentioned are set invisible, all the rows are. Is there any way to set only the checkboxes on the rows mentioned invisible, in stead of all rows?

View 1 Replies View Related

Forms :: Edit Button To Enable Edits On Form And Subform

Sep 22, 2013

I have a form "Handover" on this form I have a button that enables edit functionality once clicked, I now have a subform on this form named "Bdown".

The Bdown subform allows edits without having to click the "btn_Edit" on the main form "Handover".

Is is possible to make the edit button on "Handover" control the edit function on "Bdown" also?

Currently "Handover" contains:

Code:
Private Sub btn_Edit_Click()
Me.AllowEdits = True
Me.btn_Edit.Caption = "Editing"
End Sub

[Code] .....

View 2 Replies View Related

Modules & VBA :: Look Up A Value In Table That Enable Or Disable Subform In Main Form

May 20, 2015

I have written code to look up a value in a table that then enables or disables a subform in my main form. The code works, but I know it is now as efficient as it can be. The main problem is that I have multiple values that determine if the subform should be enabled or disabled. I would like to use an IN statement but I'm pretty sure this doesn't work for Dlookup. Below is an example of the code I currently have:

Code:
Sub enablecontrols(setting As Boolean)
Inv_subform.Enabled = setting
End Sub
Private Sub Form_Current()

[Code] ....

Like I said, this works fine, but I am concerned if I need to add more items to look up and the stability of the code in general.

View 3 Replies View Related

Forms :: Enable / Disable Navigation Button On Form Load?

Mar 25, 2013

Basically I want to put a code in the "on load" event of a form that enables or disables navigation buttons based on a value in a table (the table has 1 record and 1 column).

So if the value is "A", I want to hide navigation buttons on load; if it is "B", I want to show navigation buttons on load.

I know I can set this property in each form, but I have a number of forms that I want to configure at the same time.

My problem is that I don't know how to reference the value in the table.

View 3 Replies View Related

General :: How To Make Form Controls Change Size / Position As Form Is Resized

Jul 24, 2013

how to make my form controls change size / position as my form is resized / loaded on a computer with a different resolution. Several of the tutorials out there suggest putting code on the "on resize" property of the form. When I looked at the Northwind database to try to mimic their code however, it looks like they must be doing something different as there is no on resize code under the form properties and I was unable to find the code they do use.

View 4 Replies View Related

Modules & VBA :: Adding Controls To Form And Saving Modified Form

Dec 3, 2013

I am trying to open a form in design mode and add controls, this i have done. I am doing this all in a class, and am having trouble saving the modified form.

I have tried using the following, both produce errors

Code:

DoCmd.Save acForm, "tmpQueryDes"
DoCmd.Close acForm, "tmpQueryDes", acSaveYes

View 3 Replies View Related

Form Controls

May 28, 2005

Hi guys,

please give me some directions.

Recently I designed a form with several controls including both TextBox and Combox. Before I submit data by clicking the button, I use VBA to validate the values of those controls (textbox and combox). If the value is not valid, the system will eject a msgbox and automatically set the focus on that component. In order to tidy the code, I use a GoTo statement, which refers to a group of code to display the message due to the value of parameters

But it seems VBA doesn't recongize the control I set through the parameter.

The code as the following:

private function validation () as boolean

Dim ErrorMessage as string
Dim ErrorComponent as String

......
ErrorMessage="Please select the shop Name"
ErrorComponent="ShopName" // ShopNameis a combox

GoTo ExitFunction
.....

......
ErrorMessage="Please set the start date"
ErrorComponent="StartDate" // StartDate is a Textbox
GoTo ExitFunction
.....



ExitFunction:
msgResult = MsgBox(ErrorMessage, vbOKOnly, "Error Message")
Me(ErrorComponent).SetFocus
validation = False
Exit Function


=============

As I tested for seveal time, I'm sure there is something wrong with
"
msgResult = MsgBox(ErrorMessage, vbOKOnly, "Error Message")
Me(ErrorComponent).SetFocus
"

but how can I fix it?

Many Thanks

View 4 Replies View Related

Form With Two Tab Controls

Aug 29, 2006

I am new to Access and have not used VBA.

I have searched the forum on this, but I can't find an example of this problem.

I have a data entry form with a two-page tab control. One is for company info and the other for contact info. The recordsource is a query based on the two tables. Initially I had the page set up as a rather large form with a subform and decided to convert to the cleaner looking tab control (I used copy and paste to transfer the controls).

This form worked initially, but now I have changed some setting so that it doesn't work anymore: I can enter data properly on the first tab, but not on the second.

I have tried changing the various form properties but I must be missing something obvious. All my tab-less forms work the way I expect them to.

What I don't understand is why one tab works and not the other.

View 14 Replies View Related

Creating Form Controls In VBA

Dec 18, 2005

Hi guys,

I would like to create text boxes using VBA code ....the reason is that I need a number of text boxes to be created that is equal to the number of rows that is generated by an SQL query.

Any suggestions?

Tnx!

View 2 Replies View Related

Hide Controls On A Form

Feb 27, 2006

How do you hide the canned record scrolling keys on the bottom of a Form? I have placed my own controls and do not need them to confuse the Operator, or cause problems.

View 1 Replies View Related

Trouble With Controls In A Form

May 10, 2006

I created lots of controls on my form, and now i cannot create anymore. I do not know what the problem is... I just get an error message that says:

"MS Office Access cannot create any more controls in your form/report. If you have deleted controls from this form/report in the past, try renaming the form/report and then add more controls to it"

I tried renaming the form already. it didnt work :confused:

I tried to create a new database (i copied all the tables, queries and forms into the new database). it didnt work.


I dont know what else to do... Please help
I would dearly appreciate any help. Thank you in advance :)

View 2 Replies View Related

Form's Controls 'invisible'

Nov 8, 2006

I have few forms that look fine when in Design view, but which appear as plain grey screens when opened in Form view. These were working perfectly (i.e. visible in both views) until about half an hour ago.

The only things I have changed are some of the calculations behind certain fields.

Any thoughts?

View 8 Replies View Related

Troubles With Form Controls

Sep 1, 2005

I have a number of list boxes that dont show up in the VBEditor under the form name.

To be more specific, these controls do not show up in the drop-down list on top of the code window. If I try to assign an event procedure through 'code builder' to these controls, they refer back to a pre-existing module instead of the form under "Access Class Objects".

I have tried repairing and compacting the database to no avail. Can someone guide me? Please ask for more info if you would like some.

Thanks in advance.

View 2 Replies View Related

Autocenter Controls On Form

Jul 28, 2006

Hi,
I have a rather simplistic problem that I can't find a solution to! I have a
form that I want to maximize every time it opens (which I have achieved
through DoCmd.Maximize in the Form_Load event), but I also want that all the
controls in the form, staying positioned relative to each other, center
themselves horizontally on the form once it is resized. Maybe I can set a
property that always makes them stay in the horizontal center, which is also
great. How could I accomplish this?
Thank you!
Kriti

View 3 Replies View Related

Add Controls To A Form Dynamically?

Oct 27, 2006

Hi,

Does anyone know how to add controls to a form, dynamically??

View 6 Replies View Related

Ms Access Form With Tab Controls?

Feb 6, 2015

I m trying to create a form with tab controls but it keeps on disappearing in the form view but showing up in design view. Even when I delete the tab control and drag existing fields onto a blank form it is still not showing up in form view but showing in design view.

View 2 Replies View Related







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