Forms :: Grouping Controls To Disable All At Same Time
Oct 25, 2013
I want to disable in VBA (.enabled = false) a lot of controlls, depending of some conditions. Is it possible to group (and having an unique name)these controlls to disable them all together at the same time.
I'm in the process of creating a database in Access 2010 that has two front ends, basically. What I want to be able to do is lock out one of those front ends for a specific period of time every day.
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...]
I have a form that displays fields from two tables. I have set the properties of Allow Edit, Allow Additions, Allow Update, Data Entry to NO. However I want to allow users to be able to add new, edit/update and delete records from the form by clicking on respective command buttons.
the problem is that the code that I am using is giving me errors that says that I "You cannot go to the specified field" I need help on proper VB code to use that will allow me to enable input and update on the records in the table.
I am trying to group time entries so that I can say, between 8AM and 10AM there were this number of calls. I have a field called Time_Assigned with numberous time entries (such as 08:15:33 AM) corresponding to another field called Incident_Type (such as medical). The data spans a whole year so I have several thousand time entries and I would like to show how many incident types occur between such and such hours. Thanks again for everyone's generous help.
Here is my problem. We stage outages once 3 tickets have been recieved for the same problem type, but only if all three tickets are entered within 16.65 hours or 999 minutes. I.E. the third ticket is received within 999 minutes of the first ticket. How can I capture this based on the field time entered?
I was wondering if there is a way to disable a command button after it has been clicked for a small period of time. (lets say 1 second) stopping the user from any happy clicking. (fast repetitive clicks)
This is to do with viewing embedded images, i can explain more if required.
Hello, I would be very greatful if someone could help me. I have a Combo box called "COM01" which i want it to control the enable function of 3 Text Boxes TXT01,TXT02 and TXT03. When COM01 dropdown menu is used and field No is selected i want the 3 Text Boxes above to be set to Enable (False). The reverse when option Yes is selected is required for the same Text Boxes Enable (True) I will be adding the code to the Change() of the COM01 properties I have tried to use Case statments without success. Any help is greatly needed
I have a list of customers, with Account Numbers and Company Names. Now I have entered a combo box in my form control with a list of Account Numbers, how ever I wish to group these Account Numbers because some are the same, with the same company but a different Employee.
So how do I group Account Numbers within the combo box?
I wish to make an Access DB that will work as a HUB for a few different people in our company to work off of as a means of putting analytical results in tables where a SampleID is given to each sample and is unique. I want to know if there is a way to group any given number of SampleID records together into a 'ProjectGrp' and produce something along the lines of a work order form so the other people in the company can look at a ProjectGrp, see what SampleIDs are part of that group, and then fill in the data for each SampleID.
I want to use a tab form where the user can click add, search, and edit records all from 3 tabs. The problem is I only want to be able to add data on one form, edit data on another, and just read only on the search. This seems to cause a dilemma, how can I specifiy them to add, edit, and read only on one form using tabs?
I am making a database that will be used by multiple people on a network, and they have different resoloutions on their own computers. when the database is loaded on their respective computers, the form controls are all off.
On the computer i designed them on, the forms fit perfectly on screen, as do the controls, i would like to know if there is some vba code i could incorporate into the form open event, or module code that i can use in order to dynamically re-seize the forms and all of the controls to suit different resoloutions?
I have a date/time text field on a form with the General Date format and a combo box next to it that has sequencial times as the row source (IE. 12:45 AM, 1:00 AM, 1:15 AM, 1:30 AM, ETC.) When the user chooses a time in the combo box, I want the time portion of the text box to be updated with the chosen time in the combo. I have tried a few things but cant seem to get it right.
I have a main form, 2 sub forms, and 2 text-boxes on the main form. I have a search box now for the first subform. Works perfectly. Once the users filtered based on name, I want them to be able to select that filtered record which would filter another subform.
Right? ok.
My first attempt was to assign the ID that was selected to a textbox on the main form, then automatically requery the second subform based on that value. I used this way on my search box. I'm sure there is a way to go directly from clicking the value to requerying the second subform, but i don't know it.
That being said even the indirect first attempt isn't working. It all has to do with the ".", "!", and ordering of this stuff. It has to do something with Parent child, but beyond that I'm at a loss.
I did find this very useful site [URL] ...... It shows what code you can use depending on where you are and what you're doing. Even with that as a resource, i'm still at a loss.
I have a form "Member's Details" that has a few tabs. One tab is titled "Deacon Families" and I want to be able to either lock it, or grey it out, or something along those lines base on if the member is a deacon or not (I do have a yes/no field asking if they're a deacon). If they are NOT a deacon, the user should not be able to open the tab (because there would not be any information to show) and a pop up saying something like "This tab is empty because the member is not a deacon". If they are a deacon, I would like it to show all the members who have been assigned to them. I know this needs to be done in a subreport, but I don't know how to set it up. There is a deacon table which is linked to a family table which is linked to the member table, but the member table and deacon table are not directly linked.
I have a form that allows me to update entries in a table. When I select the line I need to update and hit the "edit" button I get a run time error '2164' You cant disable a control while it has the focus. when I debug the line in the code that is highlighted yellow is Me.cmdEdit.Enabled = False.
I developed the database in access 2013, and now I am forced to run the database on a computer that has Access 2003. I have changed the database base to access 2000-2003.
I've been puzzling over this one for a few days. I've done a few searches on here to borrow some code - but the fact is I don't understand how to implement the suggestions. I'm hoping somone can help.
Basically, I have a form for editing the database, however, there are a number of reasons for opening this form - so at the moment I have several copies of the same form all with very minor changes. In order to streamline the way I've done this, I'd rather have controls always call up the same Form - but state in their code whether or not certain controls on the editing form are visible or not...
:mad: :eek: :mad: :eek: :confused:
It's all gone rather Pete Tong here. And I must admit I'm button bashing the code a bit now. Basically, when a button is pressed, I want it to load the form "frmEditJob". Depending on what I want visible, the Tags "N, M and V" will activate and deactivate certain controls on "frmEditJob".
With me? :confused:
Any help is appreciated!
Cheers.
Private Sub EditJob_Click() On Error GoTo Err_EditJob_Click
Dim stDocName As String Dim stLinkCriteria As String
If IsNull(Me![IDEntry]) Then strMsg = "You need to enter a Valid ID number in the box provided." strTitle = "ID Number Error" intStyle = vbOKOnly MsgBox strMsg, intStyle, strTitle Exit Sub End If
I'm new to Access and am having trouble designing a database that houses application details.
All applications have a list of unique wrap id's but have different tables housing different details for these wraps.
I have a main table which is for data entry and lets me input whether or not a piece of software is Vista compatible (yes/no) etc.
I also have a field in this table showing which analyst is responsible for researching compatiblity of an application.
I have another table with different regions i.e. london, manchester etc that has the region/city listed as the field heading and then contains a list of wraps used in that city under the relevant field.
My main entry form is linked to the main data entry table that holds specifics for an app, name, vista compatible etc. This form is used for data entry. I want to add a subform on this form which shows a list of all applications, in table format, but I want a drop down list so I can select an analyst name / region so that analysts can update details for a specific area assigned to them. In the table I want all of the records based on this criteria to be displayed.
I guess I need to make a filter button on my subform but do not know how to do this. I put in a button control for apply filter by form but then dont know what to do.
I'm new to access and don't know much VB - e.g. the only thing I can do in VB is a make a message box that says hello world on the screen.
Any help is sincerely appreciated. Apologies for the Essay.
I have a subroutine which cycles through all controls on a form, and for controls with applicable tags, either enables or disables the control.
The routine accepts a form as the parameter (frm), and is called from a button on the form itself.
Despite trying frm.repaint in the generic routine, and, me.repaint from the calling form, the controls do not seem to repaint until the mouse moves over them. A command button, for example, will be grey-ed out, despite being enabled, but will un-grey when the mouse goes over it.
I have a main form, lets call it FrmMain. In addition, I have a subform on FrmMain that has a tab control on it (frmSubform). What I would like to do is on form load, reference the tab control that is on the subform, loop through the controls/textboxes, lock them and change their backcolor. The code I am attempting is listed below, however, I am getting a "type mismatch error" highlighting this line:
PHP Code:
Set Frm = Forms!frmConsultingMain!FrmConsultingFeeData
Below is my code:
PHP Code:
Dim ctl As ControlDim Frm As FormSet Frm = Forms!frmmain!FrmSubformFor Each ctl In Frm.Controls If (TypeName(ctl) = "Textbox" Or (TypeName(ctl) = "combobox") Or (TypeName(ctl) = "listbox")) Then ctl.Value = Null ctl.BackColor = vbYellow ctl.Locked = True End IfNext ctl
I had never seen this before as I have recently moved from 2003 to 2010. When I create a from using the wizard sometimes the controls are grouped (inside a dashed square) which does not allow me to modify its size and/or position independently.
On my data entry Form, I have a Combo Box [Condition] and five tab controls. Each tab has as many as 10 controls on it. The purpose of the Form is to populate a table. My questions are:
1) Do I still need to use a subform on each Tab or leave them as-is? i.e. the 10 controls are on each tab
2) How do I make the value of [Condition] transfer focus to the appropriate tab??