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.

View Replies


ADVERTISEMENT

Modules & VBA :: Create Disable Alphabetic Keys Function Based On Case Statement

Jul 31, 2015

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")

[Code] .....

View 14 Replies View Related

Queries :: Using Combo Box Case To Run Query And Generate Report

Jun 30, 2015

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));

View 1 Replies View Related

General :: Input Data In Lower Case And Automatically Change First Letter Of Word To Upper Case

Mar 16, 2013

Is there any way of making data that is inputted in lower case to automatically change to the first letter of each word being a capital ...

View 4 Replies View Related

Disable Delete In Combo Box

May 18, 2005

On the form for the Addresses I have a Combo Box for picking a Country.

When I hit the Delete button while the cursor is in the box I get a Message saying:

'You cannot assign the Null value to a Variable that is not a Variant data type'

The box has 2 columns, CountryName (Text) and CountryID (number), the second is the bound column.

I tried to Set the Warnings off, catch the error in the After Update Event, but
nothing helps to get rid of the Error Message.

Is there a way to Disable the Delete button, while in he box?
Or is there a better solution?

Thanks.

View 4 Replies View Related

Disable Combo Box After Update?

Jan 5, 2007

Hello,

I have been playing around to see if it is possible to operate a combo box as a one shot operation.

I.e you make a selection from the combo box then the combo box is disabled.

Only prob is that I can't figure out how to do it.

Possibly by using a message box to see if selection is correct, if Ok clicked
then data entered and comboboc.enabled = false?

Or can this not be done.

B

View 2 Replies View Related

Disable Combo Box After Select The Record.

Sep 20, 2006

Hi Everyone,

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!

Regard,
alex

View 14 Replies View Related

I Want Have Little Arrows To Select My Date!!

Aug 25, 2006

hey, little prob for improving my database..

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!!!

cheers for the help (if anyone can)

Myle

View 2 Replies View Related

Forms :: Keep Getting Up / Down Arrows In Control

Aug 11, 2015

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.

View 2 Replies View Related

Disable Menu Paste Option In Combo Box

Oct 18, 2006

I'm trying to disable users from right clicking, from within a combo box and selecting paste. The following code is suppose to work

Private Sub DESCREP_DESCRIPTION_GotFocus()
Application.CommandBars("Form View Control").Controls("Paste").Enabled = False
End Sub

but it doesn't work, any suggestions?

View 2 Replies View Related

Modules & VBA :: Subform - Up Down Arrows Through Records

Jun 16, 2014

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.

View 1 Replies View Related

Forms :: Left And Right Keypress Not Using Arrows?

May 17, 2013

In my forms I would often like to move forward or back a records, usually a date by keyboard alone.

The keyboard arrows are good but they are normally used to navigate along a line etc.

Page Up & Down again better & often used for moving between records but do sometime need there native functions.

Trying to avoid changing the functions of these keys depending of what part fo the form I am on or current function I an doing.

It would have been great if there was a Alt Left or Ctrl Left that gave a different ansii.

Alt N - next, Alt P - previous, not pretty.

View 5 Replies View Related

Forms :: Disable Subform Filter If Combo Box Is Empty

Sep 21, 2014

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

[code]....

View 3 Replies View Related

Hiding Drop Down Arrows In A Printable Form

Aug 23, 2006

Hi

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

View 4 Replies View Related

Ability To Use Arrows To Navigate Between Records In Database

Dec 8, 2014

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?

View 9 Replies View Related

Modules & VBA :: Disable Button When Text / Combo Fields Are Null

Aug 5, 2013

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

View 13 Replies View Related

Change Case To Title Case

Aug 24, 2004

hi

help is needed yet again :-)

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....

View 11 Replies View Related

Forms :: Enable / Disable Check Boxes Based On Combo Box Selection

Jun 17, 2015

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"

View 14 Replies View Related

Need Some Ideas

Jul 22, 2005

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?

Thanks in advance,

Earl

View 10 Replies View Related

Ideas?

Jul 13, 2006

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?

View 1 Replies View Related

Database Ideas?

Jul 18, 2007

Hello everyone.

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 hope that you can help

View 5 Replies View Related

Organizational Ideas

Mar 25, 2008

Hello all, glad to be here

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

any ideas are appreciated :D

View 9 Replies View Related

Void Of Ideas?

Dec 9, 2004

I have decided to amend a database because my original design was rubbish!!

Why? Currenlty a user selects a ServiceID from a combo:

SELECT tblServices.ServiceID, [ServiceCategory] & "-" & [VehicleType] & "-" & [ServiceType] AS Expr1 FROM tblServices ORDER BY [ServiceCategory] & "-" & [VehicleType] & "-" & [ServiceType];


That produces:
Car-Larger-Wash

I have added a new table to the DB to list car makes and models.

The user will select a car make and model from one field (combo) on a service form.

From the next field they will selct the service to be performed on the selected vehicle i.e. Wash / Vacum / Full Valet

My dilema? I can not think of a relationship for the new table 'tblVehicles'?

Any suggestions?

Should I add a new field to tblServices?
Cheers,
Phil.

View 14 Replies View Related

Need Structure Ideas

Dec 28, 2006

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?

Any and ALL advice is greatly appreciated!

~ Audrey

View 10 Replies View Related

Any Ideas, HELPPPPP!!!!

Feb 22, 2005

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?

View 1 Replies View Related

Script Error Any Ideas

May 11, 2005

last ever question, i need a long hloiday

it errors on: theId = ctl.Column(0, v)

Private Sub Monthly_MD_Report_Click()

'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

End Sub

View 4 Replies View Related







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