473,287 Members | 1,574 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,287 software developers and data experts.

Problem w/AutoExpand in Combobox

Hi -

In my A2K database, I have a form with 2 Unbound Comboboxes, both of which
open up forms to a particular record. One of these comboboxes works
perfectly. For some reason the 2nd one WILL NOT autofill. If I enter a
number to lookup by typing it in, it ALWAYS says it's not in the list (Error
2237) - but if I select the item, it works fine. I only have 1 field in this
combobox - the SampleID. It is set up with the following properties:

Not In List=YES
Auto Expand=YES
Column Count=1
Bound Column=1
Row Source Type=Table/Query
Row Source=SELECT DISTINCT [tblSamples].[SampleID] FROM tblSamples ORDER BY
[tblSamples].[SampleID];

(I have also tried with multiple fields, but the bound column was always 1).

I have tried the following:
1) removing the combobox and putting on a fresh one, running repair, making
an entire 2nd form from scratch, etc.
2) making the NOT IN LIST property=NO, which will allow me to enter an
item - but if it's not a valid SampleID, I get an error msg when it tries to
open it up (and it doesn't auto expand).
3) Coding "cboSampleRef.Autoexpand=true" in the GotFocus Event.

Eventually the list of SampleID's is going to get rather lengthy, so the
AuotExpand feature is necessary....scrolling wouldn't work.
Is there some unwritten rule that you can only have ONE of this type of
combobox per form? Am I missing some obvious step? (I do these all the
time....)

Someone, PLEEEEEEZ, have a solution ......

Thanks!

Andi Plotsky
Nov 13 '05 #1
2 6347
DBQueen wrote:
Hi -

In my A2K database, I have a form with 2 Unbound Comboboxes, both of which
open up forms to a particular record. One of these comboboxes works
perfectly. For some reason the 2nd one WILL NOT autofill. If I enter a
number to lookup by typing it in, it ALWAYS says it's not in the list (Error
2237) - but if I select the item, it works fine. I only have 1 field in this
combobox - the SampleID. It is set up with the following properties:

Not In List=YES
Auto Expand=YES
Column Count=1
Bound Column=1
Row Source Type=Table/Query
Row Source=SELECT DISTINCT [tblSamples].[SampleID] FROM tblSamples ORDER BY
[tblSamples].[SampleID];

(I have also tried with multiple fields, but the bound column was always 1).

I have tried the following:
1) removing the combobox and putting on a fresh one, running repair, making
an entire 2nd form from scratch, etc.
2) making the NOT IN LIST property=NO, which will allow me to enter an
item - but if it's not a valid SampleID, I get an error msg when it tries to
open it up (and it doesn't auto expand).
3) Coding "cboSampleRef.Autoexpand=true" in the GotFocus Event.

Eventually the list of SampleID's is going to get rather lengthy, so the
AuotExpand feature is necessary....scrolling wouldn't work.
Is there some unwritten rule that you can only have ONE of this type of
combobox per form? Am I missing some obvious step? (I do these all the
time....)


On Not In List should be the name of a function or a macro, not "Yes."
Limit To List should be set to "Yes."
--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)
Nov 13 '05 #2
DBQueen wrote:
Hi -

In my A2K database, I have a form with 2 Unbound Comboboxes, both of which
open up forms to a particular record. One of these comboboxes works
perfectly. For some reason the 2nd one WILL NOT autofill. If I enter a
number to lookup by typing it in, it ALWAYS says it's not in the list (Error
2237) - but if I select the item, it works fine. I only have 1 field in this
combobox - the SampleID. It is set up with the following properties:

Not In List=YES
Auto Expand=YES
Column Count=1
Bound Column=1
Row Source Type=Table/Query
Row Source=SELECT DISTINCT [tblSamples].[SampleID] FROM tblSamples ORDER BY
[tblSamples].[SampleID];

(I have also tried with multiple fields, but the bound column was always 1).

I have tried the following:
1) removing the combobox and putting on a fresh one, running repair, making
an entire 2nd form from scratch, etc.
2) making the NOT IN LIST property=NO, which will allow me to enter an
item - but if it's not a valid SampleID, I get an error msg when it tries to
open it up (and it doesn't auto expand).
3) Coding "cboSampleRef.Autoexpand=true" in the GotFocus Event.

Eventually the list of SampleID's is going to get rather lengthy, so the
AuotExpand feature is necessary....scrolling wouldn't work.
Is there some unwritten rule that you can only have ONE of this type of
combobox per form? Am I missing some obvious step? (I do these all the
time....)

Someone, PLEEEEEEZ, have a solution ......

Thanks!

Andi Plotsky


It turns out that the Null value in the combobox causes the problem
with the autofill. It explains why the combobox worked before but
stopped working once the Null value was suddenly in the table. I added
' WHERE tblSamples.SampleID IS NOT NULL' after 'FROM tblSamples' and
the autofill started working again. It fixed the problem for both A97
and A2K (I didn't try later versions).

James A. Fortune

Nov 13 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: David Savageau | last post by:
Can anyone help with the following problem? The solution will likely be elementary to many members of this newsgroup, but, Duh! I've been struggling to find it all day. On an Access 2000 form...
6
by: Andi Plotsky | last post by:
Hi - I sent this request last week, but didn't get an answer to my problem - let's try again: In my A2K database, I have a form with 2 Unbound Comboboxes, both of which open up forms to a...
0
by: Jax | last post by:
I am using a class that inherits from the DataGridTextBoxColumn. It adds a combo box into the column where it displays a selection of choices. The problem I have is that when this comboBox loses...
3
by: TT (Tom Tempelaere) | last post by:
Hay there, I'm writing my own DataGridComboBoxColumn because .NET 1.1 does not have one (I hope .NET 2.0 supplies one). I based it on this article:...
0
by: tupolev | last post by:
Hi, I already post this item but now I know whats wrong: I want to allow the user to edit the items in a combobox. The problem is that the textchange event works just one time (for the first...
30
by: dbuchanan | last post by:
ComboBox databindng Problem == How the ComboBox is setup and used: My comboBox is populated by a lookup table. The ValueMember is the lookup table's Id and the DisplayMember is the text from a...
4
by: VK | last post by:
I'm looking for autoexpand <select> list onfocus and collapse it back onselect/onblur (the list is select-one type) I know it is not possible directly, but I've seen here a hack by changing...
0
by: Ture Bergstrøm | last post by:
In my database (Access2003 SP3) I have a combo box, which has a query as row source. This query gets its values from a table with the fields id and field1. Field1 is shown in the box, the key...
1
by: tbeers | last post by:
Quick questions Is there a way to create an autoexpand property in a text or memo field? Thanks Tomb
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...

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.