combo box fills in arbitrary value

B

bicyclops

A combo box on a form selects from a list of codes (001, 015, 400, 411, 500
etc). These are formatted as text with an input mask of 000. The Row Source
is a simple Select statement that draws from a table.

When you start typing the first character in this box, Access auto fills
after the cursor with the value '411'. So if I type 0, the value is 0411,
which is not even a valid code. Even if you type 4 as the first character it
auto fills with 4411. Doesn't seem to make any sense. I've tried changing
every combo box property (I think) including those having to do with
defaults. Nothing seems to change this behavior.

I use many combo boxes, and only a few have behaved like this; I can't
figure out why.
 
D

Dirk Goldgar

bicyclops said:
A combo box on a form selects from a list of codes (001, 015, 400, 411, 500
etc). These are formatted as text with an input mask of 000. The Row
Source
is a simple Select statement that draws from a table.

When you start typing the first character in this box, Access auto fills
after the cursor with the value '411'. So if I type 0, the value is 0411,
which is not even a valid code. Even if you type 4 as the first character
it
auto fills with 4411. Doesn't seem to make any sense. I've tried changing
every combo box property (I think) including those having to do with
defaults. Nothing seems to change this behavior.

I use many combo boxes, and only a few have behaved like this; I can't
figure out why.


That sounds odd. Please post the following properties of the combo box:

1. Row Source
2. Bound Column
3. Control Source
4. Default Value
5. Column Count
6. Column Widths
7. Format

Also, if there is code or macros applied to any of the events of the combo
box, post the details of that.

Since you say the combo box's rowsource is a SELECT statement, please post
the names and types of the fields in the table from which that statement
selects.
 
B

bicyclops

Dirk - answers below.

Row Source:
SELECT TblPartPrefix.PartPrefixID, TblPartPrefix.PartPrefix,
TblPartPrefix.[Prefix Description] FROM TblPartPrefix ORDER BY
TblPartPrefix.PartPrefix;

Bound Column:1
Control Source: PartPrefixID
Default Value: blank
Column Count: 3
column Widths: 0";0.5";2"
Format: blank

Thanks for looking into it!
 
D

Dirk Goldgar

bicyclops said:
Dirk - answers below.

Row Source:
SELECT TblPartPrefix.PartPrefixID, TblPartPrefix.PartPrefix,
TblPartPrefix.[Prefix Description] FROM TblPartPrefix ORDER BY
TblPartPrefix.PartPrefix;

Bound Column:1
Control Source: PartPrefixID
Default Value: blank
Column Count: 3
column Widths: 0";0.5";2"
Format: blank

Thanks for looking into it!

Could you give me a few sample rows from TblPartPrefix? There aren't any
rows with the same PartPrefixID, are there? What type of data are
PartPrefixID and [Prefix Description]?
 
B

bicyclops

Samples:
PartPrefixID Part Type (Prefix) Prefix Description
1 001 CAD
2 400 Assembly
3 500 High-Level Assembly
4 998 Unknown
5 011 IC, Through Hole, Programmed
6 260 Stencil
7 350 Misc. Assembly
8 410 Flash Card Kit
9 411 EPROM Kit
10 999 Generics

The data types are Autonumber, Text & Text


Dirk Goldgar said:
bicyclops said:
Dirk - answers below.

Row Source:
SELECT TblPartPrefix.PartPrefixID, TblPartPrefix.PartPrefix,
TblPartPrefix.[Prefix Description] FROM TblPartPrefix ORDER BY
TblPartPrefix.PartPrefix;

Bound Column:1
Control Source: PartPrefixID
Default Value: blank
Column Count: 3
column Widths: 0";0.5";2"
Format: blank

Thanks for looking into it!

Could you give me a few sample rows from TblPartPrefix? There aren't any
rows with the same PartPrefixID, are there? What type of data are
PartPrefixID and [Prefix Description]?

--
Dirk Goldgar, MS Access MVP
Access tips: www.datagnostics.com/tips.html

(please reply to the newsgroup)
 
D

Dirk Goldgar

bicyclops said:
Samples:
PartPrefixID Part Type (Prefix) Prefix Description
1 001 CAD
2 400 Assembly
3 500 High-Level Assembly
4 998 Unknown
5 011 IC, Through Hole, Programmed
6 260 Stencil
7 350 Misc. Assembly
8 410 Flash Card Kit
9 411 EPROM Kit
10 999 Generics

The data types are Autonumber, Text & Text


No obvious explanation is jumping out at me. If you'd like to send me a
cut-down copy of your database, containing only the elements necessary to
demonstrate the problem, compacted and then zipped to less than 1MB in size
(preferably much smaller) -- I'll have a look at it, time permitting. You
can send it to the address derived by removing NO SPAM and ".invalid" from
the reply address of this message. If that address isn't visible to you,
you can get my address from my web site, which is listed in my sig. Do
*not* post my real address in the newsgroup -- I don't want to be buried in
spam and viruses.
 
K

KARL DEWEY

These are formatted as text with an input mask of 000.
Where is the mask applied?

If you insert a value in the bound table field does the combo show the
correct corresponding information? Such as 8 then it show 410 Flash Card
Kit?


--
Build a little, test a little.


bicyclops said:
Samples:
PartPrefixID Part Type (Prefix) Prefix Description
1 001 CAD
2 400 Assembly
3 500 High-Level Assembly
4 998 Unknown
5 011 IC, Through Hole, Programmed
6 260 Stencil
7 350 Misc. Assembly
8 410 Flash Card Kit
9 411 EPROM Kit
10 999 Generics

The data types are Autonumber, Text & Text


Dirk Goldgar said:
bicyclops said:
Dirk - answers below.

Row Source:
SELECT TblPartPrefix.PartPrefixID, TblPartPrefix.PartPrefix,
TblPartPrefix.[Prefix Description] FROM TblPartPrefix ORDER BY
TblPartPrefix.PartPrefix;

Bound Column:1
Control Source: PartPrefixID
Default Value: blank
Column Count: 3
column Widths: 0";0.5";2"
Format: blank

Thanks for looking into it!

Could you give me a few sample rows from TblPartPrefix? There aren't any
rows with the same PartPrefixID, are there? What type of data are
PartPrefixID and [Prefix Description]?

--
Dirk Goldgar, MS Access MVP
Access tips: www.datagnostics.com/tips.html

(please reply to the newsgroup)
 
B

bicyclops

Karl/Dirk - My bad. I just double-checked, and I did have a default value in
the table after all. I had been checking the wrong table. You pointed me in
the right direction though. It works as expected after I removed the default
value.

Thanks again for looking into it.

KARL DEWEY said:
Where is the mask applied?

If you insert a value in the bound table field does the combo show the
correct corresponding information? Such as 8 then it show 410 Flash Card
Kit?


--
Build a little, test a little.


bicyclops said:
Samples:
PartPrefixID Part Type (Prefix) Prefix Description
1 001 CAD
2 400 Assembly
3 500 High-Level Assembly
4 998 Unknown
5 011 IC, Through Hole, Programmed
6 260 Stencil
7 350 Misc. Assembly
8 410 Flash Card Kit
9 411 EPROM Kit
10 999 Generics

The data types are Autonumber, Text & Text


Dirk Goldgar said:
Dirk - answers below.

Row Source:
SELECT TblPartPrefix.PartPrefixID, TblPartPrefix.PartPrefix,
TblPartPrefix.[Prefix Description] FROM TblPartPrefix ORDER BY
TblPartPrefix.PartPrefix;

Bound Column:1
Control Source: PartPrefixID
Default Value: blank
Column Count: 3
column Widths: 0";0.5";2"
Format: blank

Thanks for looking into it!

Could you give me a few sample rows from TblPartPrefix? There aren't any
rows with the same PartPrefixID, are there? What type of data are
PartPrefixID and [Prefix Description]?

--
Dirk Goldgar, MS Access MVP
Access tips: www.datagnostics.com/tips.html

(please reply to the newsgroup)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top