Can You Disable Combo Box Arrows? If Not, Any Other Ideas For My Case?
Apr 13, 2005
I would like to have a combo box that doesn't show the drop-down arrow when the user selects it. You say, doesn't that defeat the purpose of the combo box?
Well, look. In a form I have a datasheet (in a subform) that only displays data, so it is locked from editing. Within the datasheet is a field that contains a combo box with a row source from a linked table, and the control source of that combo box is the primary key. Essentially I'm utilizing the combo box because it is smart, and allows me to display linked data: this combo box contains two columns, and I set the first column's width to "0" so that it would only display the field I want. I didn't use a subform because, in datasheet view, subform fields are not displayed in the linear fashion I need, but instead go hide under the "+" button for each record.
So, even though everything is locked from editing, the combo box arrow still appears when the user clicks on the combo box field, and I don't want it to. It's just misleading to the user. Anyone know how to disable the arrows? Or, if you catch my drift, do you know of another simple solution?
I'm not a keen programmer in case you couldn't figure that out. If you've got any VB tips then let me know.
Details: I have a Profile form that tracks the expiration date for each client's various certifications. These dates are set up in the Short Date format in the table design of Access.
Problem: When a user accidentally presses an alphabetic key while updating an expiration date, an Access error message is triggered. This is confusing to my users as these messages are written in Access lingo. I would rather that nothing occurs at all. I wrote a case statement to disable each letter of the alphabet and applied it to the On Key Down Event for each expiration date control on my Profile form to solve this problem, but this must be applied to 28 separate controls. I would rather call a function that disables alphabetic keys for each date control in my form when called.
Questions: How do I transform my Disable Alphabetic Keys Case Statement into a function that I can call for each expiration date control? I know that when writing a function certain variables have to be declared and/or initialized.
Also, will I need to create a function to re-enable alphabetic keys or is this unnecessary because the disable alpha keys function will only be called for specific controls, not the entire form?
What I Have Tried: I have tried copying and pasting my Disable Alphabetic Keys Case Statement into a module to attempt to create a function, but it needs work.
Below I have included 2 types of code: (1) The original On Key Down code applied to each date control on my form (2) The same code written as an attempt at a function
Original Profile Form Code to Disable Alphabetic Keys in the On Key Down event for each date control
Private Sub txtCert1ExpDate_KeyDown(KeyCode As Integer, Shift As Integer) Select Case KeyCode 'All message box text is for me to test the code, not for the user to see Case vbKeyA MsgBox ("you pressed the A key")
I am create a database to track leave of my team.I have create the tracker and few reports, however now I want to create a report by applying filters in 2 places, for associate and for leave type or for associate and for joint leave or for associate and for Informed.I have SQL code which does not work. how can I select the other paramater with associate name using combox box in form.
Code:
SELECT Leave_Records.[Absent Date], Leave_Records.[Associate Name], Leave_Records.[Absent Day], Leave_Records.[Leave Availed], Leave_Records.[Joint Leave], Leave_Records.[Informed TL], Leave_Records.[Leave Type], Leave_Records.[Leave Applied], Leave_Records.Comments FROM Leave_Records WHERE (((Leave_Records.[Associate Name])=Forms!Report_Form!AssociateName) And ((Leave_Records.[Leave Type])=Forms!Report_Form!Leave_Type)) Or (((Leave_Records.[Associate Name])=Forms!Report_Form!AssociateName) And ((Leave_Records.[Joint Leave])=Forms!Report_Form!Joint_Leave)) Or (((Leave_Records.[Associate Name])=Forms!Report_Form!AssociateName) And ((Leave_Records.[Informed TL])=Forms!Report_Form!Informed));
I want to try to restrict the user not always changing the record, so i need a Disable combo box command. And i did try it by using "Name.Enabled = False" after user select the value from the combo box, but the program won't let me do that because of the record is on focus. So what can i do? I only have an idea of after the user select the value from cbo then jump the cursor immediately to the second column, but anybody can tell me how to do that? Thanks alot!
In a box on the form i have the date automatically entered. however it is also possible for people to change the date for say the day before or the day after.
SO what i really want is for the date to still autoset (most of the entries will be for the current day) but i also want two little arrows on the box (like standard scroll bar style) to give me whatever date in the future, or past, that i require.
at the moment this can be done manually, but i want to make it as simple as possible so no gets to befuddled!!!
I keep getting these annoying up/down arrows in the calculated control of a form. The top one is ok, but the bottom one has these. How do I get rid of them.
I've checked the alignment on the control properties in the form and the settings are the same in the table field properties.
I have a form which has a subform that holds records from a table. When in the table i can move through the records with my up and down arrows but when I am in the subform i can not move in the same manner with up and down arrows. What needs to be done on subform to allow user to move through records using up and down arrows.
I have a form called frmSearch with an option group called grpSearch ,a combobox called comboNyaba and subform called subform_CasesSearch has a checkbox called CaseClosed
The combobox filter the subform based on option group choice and value in textbox called NyID ... it works fine except that if the combobox is empty it give me error the code in main form i put it on Load and on current
Code: Private Sub Form_Load() With Me.subform_CasesSearch.Form If Me.grpSearch.Value = 1 Then .Filter = "NyID = " & Me.ComboNyaba
I am compiling a database of my fire system 'engineers reports' by creating a form that is identical to the one that I print and give to the customer. I used combo boxes to look up system type details, from another table, after inputting the serial number. As these combo boxes can only produce one value I hid the arrows behind background coloured rectangles.
When I print the form the arrows disappear, the combo boxes expand by the width of the arrow and the last 2 digits of right-aligned numbers disappear behind my rectangles.
This form has over 200 controls (systems types, parts used numbers and quantities etc) and I need to print it on a single sheet of paper. I cannot afford to leave extra space between my controls. The only thing I can think of is setting the visible property of my rectangles to screen only, which is not ideal.
Any suggestions would be greatly appreciated. Thanks
I had set Data Entry to True in order to always default to a blank record. However that locked up my ability to use the arrows to navigate between records in the database. Is there a work around?
On a form, I want to disable the save button, 'cmdSave' whilst the form's mandatory fields have been left blank.
I've put in a smart tag, called, 'Req' against each required field and have used the following code on the forms current event.
Code: Private Sub Form_Current() Dim ctl As Control For Each ctl In Me.Controls If ctl.ControlType = acTextBox Or ctl.ControlType = acComboBox Or ctl.ControlType = acListBox Then
[Code] ....
The save button is disabled, but it won't enable again after each field has data entered against it.
I also have this code in the AfterUpdate event in each required field:
Code: Private Sub cboErrorID_AfterUpdate() Call Form_Current End Sub
I know when creating a text field in the format option you can use the > or < sign so that when text is entered it automatically changes it to uppercase or lowercase - but i need it to be Title Case, any one know how I can do this....
im trying to enable/disable checkboxes based on a combobox selection for instance,
i make the selection in a combo box called terms and conditions. i want it then to only enable the business,domestic and summary check boxes for that type, with the onther check boxes staying disabled. is there a way this can be done through code like the statement "only enable if this letter type selection has been selected"
I need some ideas on this new database that I am creating. I'm creating a database that will store employees clock in and clock out times on a weekly basis. The main table has the following fields: ID, employee name, date, clock in time, clock out time. The employee name field source is another table that has the list of all the employees names.
I need to create a form that will allow the user to easily input the clock in an out times during a week for each employee. The user will pick the employee name from a combo box. Then, on this form, I want it to have all the days of the week (sunday thru saturday) in a column format and in front of each day one field for the date and two fields for the user to input the clock in and out times respectively.
The problem that I am having with this right now is that, the form that I created only displays one record at a time, so it only shows the clock in and out times for one record. How can I get the form to diplay several records at a time so the user can add all the days of the week for certain employee on the same page?
Or is there a better idea on how to create this database?
i have get data from the sources i dont know yet but i can either import or link using access and create reports that way and or juts use crystal to connect to the data sources...any ideas?
I have just made up a database for work, it is a basic stores system where people have to book in and out the items to update the quantities manualy. I have a tick box for "on demand" which i have linked to a query for all items on demand etc.
I am just wondering if anyone can suggest any good ideas that would make the database even better, more automatic type things would be good.
We have a demands for which is just a word document I was wondering if there was anyway I could use it someway so that with one click the items that requiring demanding are put onto the form?
i am just looking for any ideas that would turn my database from good to great.
I wanted to bounce this idea off the members in the forum, its more along the lines of managing multiple databases rather than individual design.
I am a recent incumbent at a position where there are many individual access database files for the department. (Each DB is unique as are the users, usually) I am trying to flesh out ideas on how to consolidate these access files, so there is one central 'hub', where users could log on, and then select the study or project associated with that particular database, and then the DB be opened for them to begin working, rather than the current system, in which there is a rabble of access mdb files in multiple folders
It's been a LONG time since I've designed a database, but it's slowly coming back to me. However, I'm still having a very difficult time deciding the most effective way to setup my tables and queries. Here's what's going on.
The database will be used for FFA livestock shows to enter the exhibitors for market classes and showmanship classes. The database also needs to be able to break a pay scale down showing how much each exhibitor is awarded for their showmanship class and their market class. The database that the club had been using had 2 tables (1 for the exhibitor and 1 for the animals being shown). Then they had 10 different queries that sorted the animals into weight groups (ex. Class 1 is weight between 90lbs and 100lbs); and then they had 10 different queries to breakdown the showmanship classes (ex. Showmanship Class is is age between 5 and 7). This is a LOT of queries! Now, the manager wants to be able to have more than 10 classes, which their current database cannot do. He also likes to be able to enter the parameters to manually break the classes. As of now, he is manually going into each query and editing the criteria for each class, but he wants to be able to do that from a form.
So my question is.... is it best to leave this in the "multi-query" form, or is there some way I could arrange all of this from tables or from a couple queries... and also, what would be the best way to offer the option to add a new class?
I am trying to find the best way to program a timeshare inventory. Here is the problem, one unit has the possibility of being sold annually, odd or even years. If the unit is sold for just even or odd, I then need the open inventory to reflect the opposite year that is available. If the unit is sold annually I need it to be removed from open inventory totally. Also, If the unit is returned I need it to show-up back in open inventory.
Does anyone have any ideas of how to make this work simply?
'Run a report displaying only the records chosen 'by the user in the form's listbox.
Dim v As Variant Dim Frm As Form Dim ctl As Control Dim theId As Long Dim WhereCrit As String
'If nothing is selected, notify user... If Me.List101.ItemsSelected.Count = 0 Then MsgBox "Please select a month.", vbExclamation, "No Month Selected" 'and then scram. Exit Sub End If
'Assign form and control to object variables. Set Frm = Forms!FrmForm Set ctl = Frm!List101
'Begin building Where string. WhereCrit = "Expr2"
'Add each selected item to the WHERE string. For Each v In ctl.ItemsSelected '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~ 'The first column in the list, holding SupplierID, is hidden. 'See the list's "Column Widths" and "Column Count" properties in 'its property dialog and look up the terms in Help for more info. '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~ 'Coordinates: 1st column (0); row v 'where v changes for each round of the loop. theId = ctl.Column(0, v) 'Tag on to string. WhereCrit = WhereCrit & theId & " OR Expr2 " Next v 'Loop ends; selected items are now accounted for...
'NOTE: To better understand what the code is doing, uncomment the 'next line to print the Where string to the Immediate window. 'Debug.Print WhereCrit
'Clean-up the Where string by removing the trailing text. WhereCrit = Left(WhereCrit, Len(WhereCrit) - 17)
'Test (see note a few lines above). 'Debug.Print WhereCrit
'By default, the Suppliers Report returns all records from the Suppliers Table. 'Here the Suppliers Report is opened using the 'Where clause' to filter it down 'to only the items selected in the listbox. DoCmd.OpenReport "MD Form", acViewPreview, , WhereCrit