473,387 Members | 1,760 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

How to allow a combo box result to be left blank after using has clicked the box.

wordbrew
This is just a weird nuisance that corrects itself if the user selects a value from the dropdown list, but I want to allow for the user not selecting something in the dropdown list, perhaps they look at their options but then click in a different field to start working on something else, without actually having chose something.

Ok, I have a subform (which is in datasheet view) on which are two fields fldAlbumLookup_com and fldSongsLookup_com. If an album is selected from the first field, then the second field populates with song choices only from the album selected via a query qrySongs, with the qrySongs having the criteria [Forms]![frmCommissions]![frmCommissionsSubform]![fldAlbumLookup_com].

This works great, but as I said, if they say, choose Weezer as the Album, and they click on the song field and see the song choices, which now only populate with Weezer songs, but for whatever reason they don't select a song, but instead click on another field to work on I get "The Microsoft Jet database engine cannot find a record in the table tblSongTitles with the key matching field(s) 'fldSongsLookup_com'."

I know why this is popping up. Because by not selecting something, Access isn't finding their choice among the filtered list and is producing an error, but I wish to find a way of letting Access allow them to not choose anything without producing an error.

Is there a way of letting access let them NOT choose something on a combo box filtered via query based on another combo box?

Weird question I know. Hope I have given all the information needed. Thanks for any help at all.
Mar 20 '10 #1
3 2762
NeoPa
32,556 Expert Mod 16PB
I believe the control value can be set to Null. This would be equivalent to the operator using the Delete key to clear the selection.

Are you interested in doing it from the code's perspective or as the user?
Mar 20 '10 #2
Hey NeoPa,

Good to talk to you again.

I believe from a Code's perspective. I just want to bypass any chance of someone clicking on the selection, but for whatever reason they don't choose anything, and allow them to continue on. Right now if the combo is clicked but nothing is chosen from the drop down, it leaves the box empty, but with a blinking cursor, and then if they click anything else but the box, they get the jet error cause a blank value wasn't part of the filtered drop selection.

Thank you for any help or insight.
Mar 20 '10 #3
NeoPa
32,556 Expert Mod 16PB
Ah, That's a bit different. It seems like they have already selected something, but in this case it is invalid. Curious.

What do you have as the record source of the ComboBox, and what is an acceptable value in the field it's bound to?
Mar 21 '10 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Alex | last post by:
I have spent all day trying to use MS sample code AddAllToList() I have followed the instructions exactly but the combo box is always blank. If I change the RowSourceType to table/query I get a...
12
by: Randall Parker | last post by:
Using DropDownList to create select/option tags in HTML how to make the first option be a blank string? I have fields with optional values. Currently I'm populating the DropDownList by querying...
10
by: lorirobn | last post by:
Hi, I have a form with several combo boxes, continuous form format, with record source a query off an Item Table. The fields are Category, Subcategory, and Color. I am displaying descriptions,...
0
by: Jeremy Wallace | last post by:
Folks, Here's a write-up I did for our developer wiki. I don't know if the whole rest of the world has already figured out how to do this, but I hadn't ever seen it implemented, and had spent a...
8
by: salad | last post by:
I was wondering how you handle active/inactive elements in a combo box. Let's say you have a combo box to select an employee. Joe Blow has been selected for many record however Joe has left the...
6
by: StuckAndNoClue | last post by:
I've got two combo boxes on a form: 1. Division Name - "_" (Blank), "Division1", "Division2" etc 2. Members of a selected Division What I want to do is select a division and then i want the...
5
by: debbie | last post by:
I have three combo boxes on a subform. I have tried setting them up so that when the user clicks in the combo box the curser moves to the left. I have searched the posts and can find nothing that...
4
by: atiq | last post by:
i have used a combo box on a form linked to a query. the user is to select a value from the combo box and this click 'Find'. But on an old occasion where the user has forgotten to select a value from...
4
by: =?Utf-8?B?cmFuZHkxMjAw?= | last post by:
The code below goes into the dropdown event handler for a standard combo box. It makes the dropdown as wide as the widest text entry. Unfortunately, this combo box is on the right edge of the...
7
kcdoell
by: kcdoell | last post by:
I have three tables: One for the Division location: tblDivision DivisionID = Autonumber DivisionName = Text One for the Working Region: tblWrkRegion
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.