Combo Box error when Auto Number present

  • Thread starter Stacey Crowhurst
  • Start date
S

Stacey Crowhurst

I've created a couple of combo boxes on forms that show a numeric value
(stored as text) and description without problems. The combo box will show
both values but only stores the numeric one.

Ex: 105-100 Construction Contracts

However, when I try to do the same combo box from a table that has an
autonumber field it doesn't work.

Ex: 0000056845 AAA Roofing

Any suggestions?
 
J

Jeff Boyce

Stacey

"... combobox from a table ..." ?What does this mean?

Are you saying that you are trying to work directly in a table, and using
the lookup datatype? If so, search the tablesdbdesign newsgroup -- there's
a strong consensus against using the lookup datatype.

And I'm a little confused about what you describe is happening on your
forms. Comboboxes, when 'dropped', can display multiple fields, but once
selected ('closed'), they only display a single field. What do you mean
when you say your comboboxes display a numeric value and description?

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
S

Stacey Crowhurst

I used the combo box wizard on my forms to create them.
Here is the row source on the boxes that work.

SELECT [Codes - Phases].[Phase Code], [Codes - Phases].[Phase Description]
FROM [Codes - Phases] ORDER BY [Phase Code];

So it displays both the phase code and phase. Then when I make my selection
it only keeps the phase code.

But, when I use the same steps in the wizard on tables with an autonumber
field it doesn't work. Here is the row source on the boxes that don't work.

SELECT [Project - General].AutoNumber, [Project - General].[CCP No],
[Project - General].[Project Name] FROM [Project - General] ORDER BY [CCP
No];

It will only display the project name and not the CCP No. I didn't tell the
wizard to select autonumber, it just did that on its own.

Does this help? Do you need more information?

Thanks.
 
J

Jeff Boyce

Stacey

A combobox on a form shows whatever (first non-zero-width) field you tell it
to.

The lookup datatype in a table displays the lookup value, but stores the
underlying recordID.

Take a look at the column width properties of both.

Regards

Jeff Boyce
Microsoft Office/Access MVP

Stacey Crowhurst said:
I used the combo box wizard on my forms to create them.
Here is the row source on the boxes that work.

SELECT [Codes - Phases].[Phase Code], [Codes - Phases].[Phase Description]
FROM [Codes - Phases] ORDER BY [Phase Code];

So it displays both the phase code and phase. Then when I make my
selection
it only keeps the phase code.

But, when I use the same steps in the wizard on tables with an autonumber
field it doesn't work. Here is the row source on the boxes that don't
work.

SELECT [Project - General].AutoNumber, [Project - General].[CCP No],
[Project - General].[Project Name] FROM [Project - General] ORDER BY [CCP
No];

It will only display the project name and not the CCP No. I didn't tell
the
wizard to select autonumber, it just did that on its own.

Does this help? Do you need more information?

Thanks.



Jeff Boyce said:
Stacey

"... combobox from a table ..." ?What does this mean?

Are you saying that you are trying to work directly in a table, and using
the lookup datatype? If so, search the tablesdbdesign newsgroup --
there's
a strong consensus against using the lookup datatype.

And I'm a little confused about what you describe is happening on your
forms. Comboboxes, when 'dropped', can display multiple fields, but once
selected ('closed'), they only display a single field. What do you mean
when you say your comboboxes display a numeric value and description?

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
S

Stacey Crowhurst

Jeff:

The width on the box that works is: 0.3125";1.916"
The width on the box that doesn't work is: 0";0.625";3.9167"

The box that doesn't work will show me blank spots to the left of the
vertical line where the project number should be. And it will show me the
project descriptions just fine on the right side of the line. I don't think
width is the problem.

It should read:
RAC04-01 RAC/AC/ELKINS RENOVATION

But it reads this instead:
RAC/AC/ELKINS RENOVATION

Anyway, thanks for trying.
Stacey

Jeff Boyce said:
Stacey

A combobox on a form shows whatever (first non-zero-width) field you tell it
to.

The lookup datatype in a table displays the lookup value, but stores the
underlying recordID.

Take a look at the column width properties of both.

Regards

Jeff Boyce
Microsoft Office/Access MVP

Stacey Crowhurst said:
I used the combo box wizard on my forms to create them.
Here is the row source on the boxes that work.

SELECT [Codes - Phases].[Phase Code], [Codes - Phases].[Phase Description]
FROM [Codes - Phases] ORDER BY [Phase Code];

So it displays both the phase code and phase. Then when I make my
selection
it only keeps the phase code.

But, when I use the same steps in the wizard on tables with an autonumber
field it doesn't work. Here is the row source on the boxes that don't
work.

SELECT [Project - General].AutoNumber, [Project - General].[CCP No],
[Project - General].[Project Name] FROM [Project - General] ORDER BY [CCP
No];

It will only display the project name and not the CCP No. I didn't tell
the
wizard to select autonumber, it just did that on its own.

Does this help? Do you need more information?

Thanks.



Jeff Boyce said:
Stacey

"... combobox from a table ..." ?What does this mean?

Are you saying that you are trying to work directly in a table, and using
the lookup datatype? If so, search the tablesdbdesign newsgroup --
there's
a strong consensus against using the lookup datatype.

And I'm a little confused about what you describe is happening on your
forms. Comboboxes, when 'dropped', can display multiple fields, but once
selected ('closed'), they only display a single field. What do you mean
when you say your comboboxes display a numeric value and description?

Regards

Jeff Boyce
Microsoft Office/Access MVP

message I've created a couple of combo boxes on forms that show a numeric value
(stored as text) and description without problems. The combo box will
show
both values but only stores the numeric one.

Ex: 105-100 Construction Contracts

However, when I try to do the same combo box from a table that has an
autonumber field it doesn't work.

Ex: 0000056845 AAA Roofing

Any suggestions?
 
J

Jeff Boyce

Note that the first width on that one that "doesn't work" is 0 ... that
means "don't show it". If you want to see it, set it to something bigger
than zero.

Regards

Jeff Boyce
Microsoft Office/Access MVP

Stacey Crowhurst said:
Jeff:

The width on the box that works is: 0.3125";1.916"
The width on the box that doesn't work is: 0";0.625";3.9167"

The box that doesn't work will show me blank spots to the left of the
vertical line where the project number should be. And it will show me the
project descriptions just fine on the right side of the line. I don't
think
width is the problem.

It should read:
RAC04-01 RAC/AC/ELKINS RENOVATION

But it reads this instead:
RAC/AC/ELKINS RENOVATION

Anyway, thanks for trying.
Stacey

Jeff Boyce said:
Stacey

A combobox on a form shows whatever (first non-zero-width) field you tell
it
to.

The lookup datatype in a table displays the lookup value, but stores the
underlying recordID.

Take a look at the column width properties of both.

Regards

Jeff Boyce
Microsoft Office/Access MVP

Stacey Crowhurst said:
I used the combo box wizard on my forms to create them.
Here is the row source on the boxes that work.

SELECT [Codes - Phases].[Phase Code], [Codes - Phases].[Phase
Description]
FROM [Codes - Phases] ORDER BY [Phase Code];

So it displays both the phase code and phase. Then when I make my
selection
it only keeps the phase code.

But, when I use the same steps in the wizard on tables with an
autonumber
field it doesn't work. Here is the row source on the boxes that don't
work.

SELECT [Project - General].AutoNumber, [Project - General].[CCP No],
[Project - General].[Project Name] FROM [Project - General] ORDER BY
[CCP
No];

It will only display the project name and not the CCP No. I didn't
tell
the
wizard to select autonumber, it just did that on its own.

Does this help? Do you need more information?

Thanks.



:

Stacey

"... combobox from a table ..." ?What does this mean?

Are you saying that you are trying to work directly in a table, and
using
the lookup datatype? If so, search the tablesdbdesign newsgroup --
there's
a strong consensus against using the lookup datatype.

And I'm a little confused about what you describe is happening on your
forms. Comboboxes, when 'dropped', can display multiple fields, but
once
selected ('closed'), they only display a single field. What do you
mean
when you say your comboboxes display a numeric value and description?

Regards

Jeff Boyce
Microsoft Office/Access MVP

in
message I've created a couple of combo boxes on forms that show a numeric
value
(stored as text) and description without problems. The combo box
will
show
both values but only stores the numeric one.

Ex: 105-100 Construction Contracts

However, when I try to do the same combo box from a table that has
an
autonumber field it doesn't work.

Ex: 0000056845 AAA Roofing

Any suggestions?
 
S

Stacey Crowhurst

Yeah, the first one is the autonumber that the wizard selected. The second
one is project number which I selected and the third is project description
which I selected.

Jeff Boyce said:
Note that the first width on that one that "doesn't work" is 0 ... that
means "don't show it". If you want to see it, set it to something bigger
than zero.

Regards

Jeff Boyce
Microsoft Office/Access MVP

Stacey Crowhurst said:
Jeff:

The width on the box that works is: 0.3125";1.916"
The width on the box that doesn't work is: 0";0.625";3.9167"

The box that doesn't work will show me blank spots to the left of the
vertical line where the project number should be. And it will show me the
project descriptions just fine on the right side of the line. I don't
think
width is the problem.

It should read:
RAC04-01 RAC/AC/ELKINS RENOVATION

But it reads this instead:
RAC/AC/ELKINS RENOVATION

Anyway, thanks for trying.
Stacey

Jeff Boyce said:
Stacey

A combobox on a form shows whatever (first non-zero-width) field you tell
it
to.

The lookup datatype in a table displays the lookup value, but stores the
underlying recordID.

Take a look at the column width properties of both.

Regards

Jeff Boyce
Microsoft Office/Access MVP

message I used the combo box wizard on my forms to create them.
Here is the row source on the boxes that work.

SELECT [Codes - Phases].[Phase Code], [Codes - Phases].[Phase
Description]
FROM [Codes - Phases] ORDER BY [Phase Code];

So it displays both the phase code and phase. Then when I make my
selection
it only keeps the phase code.

But, when I use the same steps in the wizard on tables with an
autonumber
field it doesn't work. Here is the row source on the boxes that don't
work.

SELECT [Project - General].AutoNumber, [Project - General].[CCP No],
[Project - General].[Project Name] FROM [Project - General] ORDER BY
[CCP
No];

It will only display the project name and not the CCP No. I didn't
tell
the
wizard to select autonumber, it just did that on its own.

Does this help? Do you need more information?

Thanks.



:

Stacey

"... combobox from a table ..." ?What does this mean?

Are you saying that you are trying to work directly in a table, and
using
the lookup datatype? If so, search the tablesdbdesign newsgroup --
there's
a strong consensus against using the lookup datatype.

And I'm a little confused about what you describe is happening on your
forms. Comboboxes, when 'dropped', can display multiple fields, but
once
selected ('closed'), they only display a single field. What do you
mean
when you say your comboboxes display a numeric value and description?

Regards

Jeff Boyce
Microsoft Office/Access MVP

in
message I've created a couple of combo boxes on forms that show a numeric
value
(stored as text) and description without problems. The combo box
will
show
both values but only stores the numeric one.

Ex: 105-100 Construction Contracts

However, when I try to do the same combo box from a table that has
an
autonumber field it doesn't work.

Ex: 0000056845 AAA Roofing

Any suggestions?
 
S

Stacey Crowhurst

Jeff:

With some other help I figured out that is was a problem with Access 2003
Service Pack 3. Apparently, it was one of the bugs.

Thanks anyway.

Jeff Boyce said:
Note that the first width on that one that "doesn't work" is 0 ... that
means "don't show it". If you want to see it, set it to something bigger
than zero.

Regards

Jeff Boyce
Microsoft Office/Access MVP

Stacey Crowhurst said:
Jeff:

The width on the box that works is: 0.3125";1.916"
The width on the box that doesn't work is: 0";0.625";3.9167"

The box that doesn't work will show me blank spots to the left of the
vertical line where the project number should be. And it will show me the
project descriptions just fine on the right side of the line. I don't
think
width is the problem.

It should read:
RAC04-01 RAC/AC/ELKINS RENOVATION

But it reads this instead:
RAC/AC/ELKINS RENOVATION

Anyway, thanks for trying.
Stacey

Jeff Boyce said:
Stacey

A combobox on a form shows whatever (first non-zero-width) field you tell
it
to.

The lookup datatype in a table displays the lookup value, but stores the
underlying recordID.

Take a look at the column width properties of both.

Regards

Jeff Boyce
Microsoft Office/Access MVP

message I used the combo box wizard on my forms to create them.
Here is the row source on the boxes that work.

SELECT [Codes - Phases].[Phase Code], [Codes - Phases].[Phase
Description]
FROM [Codes - Phases] ORDER BY [Phase Code];

So it displays both the phase code and phase. Then when I make my
selection
it only keeps the phase code.

But, when I use the same steps in the wizard on tables with an
autonumber
field it doesn't work. Here is the row source on the boxes that don't
work.

SELECT [Project - General].AutoNumber, [Project - General].[CCP No],
[Project - General].[Project Name] FROM [Project - General] ORDER BY
[CCP
No];

It will only display the project name and not the CCP No. I didn't
tell
the
wizard to select autonumber, it just did that on its own.

Does this help? Do you need more information?

Thanks.



:

Stacey

"... combobox from a table ..." ?What does this mean?

Are you saying that you are trying to work directly in a table, and
using
the lookup datatype? If so, search the tablesdbdesign newsgroup --
there's
a strong consensus against using the lookup datatype.

And I'm a little confused about what you describe is happening on your
forms. Comboboxes, when 'dropped', can display multiple fields, but
once
selected ('closed'), they only display a single field. What do you
mean
when you say your comboboxes display a numeric value and description?

Regards

Jeff Boyce
Microsoft Office/Access MVP

in
message I've created a couple of combo boxes on forms that show a numeric
value
(stored as text) and description without problems. The combo box
will
show
both values but only stores the numeric one.

Ex: 105-100 Construction Contracts

However, when I try to do the same combo box from a table that has
an
autonumber field it doesn't work.

Ex: 0000056845 AAA Roofing

Any suggestions?
 

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