A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

combo box fills in arbitrary value



 
 
Thread Tools Display Modes
  #1  
Old May 14th, 2010, 04:50 PM posted to microsoft.public.access.forms
bicyclops
external usenet poster
 
Posts: 29
Default combo box fills in arbitrary value

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.
  #2  
Old May 14th, 2010, 06:07 PM posted to microsoft.public.access.forms
Dirk Goldgar
external usenet poster
 
Posts: 2,529
Default combo box fills in arbitrary value

"bicyclops" wrote in message
...
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.

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

(please reply to the newsgroup)

  #3  
Old May 14th, 2010, 07:02 PM posted to microsoft.public.access.forms
bicyclops
external usenet poster
 
Posts: 29
Default combo box fills in arbitrary value

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!





"Dirk Goldgar" wrote:

"bicyclops" wrote in message
...
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.

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

(please reply to the newsgroup)

  #4  
Old May 14th, 2010, 07:59 PM posted to microsoft.public.access.forms
Dirk Goldgar
external usenet poster
 
Posts: 2,529
Default combo box fills in arbitrary value

"bicyclops" wrote in message
...
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)

  #5  
Old May 14th, 2010, 09:05 PM posted to microsoft.public.access.forms
bicyclops
external usenet poster
 
Posts: 29
Default combo box fills in arbitrary value

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" wrote:

"bicyclops" wrote in message
...
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)

  #6  
Old May 14th, 2010, 09:16 PM posted to microsoft.public.access.forms
Dirk Goldgar
external usenet poster
 
Posts: 2,529
Default combo box fills in arbitrary value

"bicyclops" wrote in message
...
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.

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

(please reply to the newsgroup)

  #7  
Old May 14th, 2010, 11:56 PM posted to microsoft.public.access.forms
KARL DEWEY
external usenet poster
 
Posts: 10,767
Default combo box fills in arbitrary value

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" wrote:

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" wrote:

"bicyclops" wrote in message
...
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)

  #8  
Old May 17th, 2010, 09:38 PM posted to microsoft.public.access.forms
bicyclops
external usenet poster
 
Posts: 29
Default combo box fills in arbitrary value

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" wrote:

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" wrote:

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" wrote:

"bicyclops" wrote in message
...
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)

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 11:18 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.