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 Value not Shown



 
 
Thread Tools Display Modes
  #1  
Old May 26th, 2004, 05:23 PM
Tim J
external usenet poster
 
Posts: n/a
Default Combo Box Value not Shown

I have a combo box on a form which using a 'not in' qry.

The combo box has two columns, ID and Serial# (which are
in the same table)

ID is hidden in combo box (width set to 0")

ID is the bound column.

The not in query will not allow to select serial# (ID) if
that Serial# exists in the table the form is bound to.

Hence Once a serial# has been selected it may not exist in
another record (no duplicates) and is no longer available
in the list.

The problem I am having is since the Serial# is removed in
the list you can longer see that you have selected it in
the current record.

Is there a way I may fix this. I would rather not have to
create a seperate list or text box to show the selected
value. I would just like it to remain in the combo box
for that record.

Is this happening becuase the bound column is not visible?

bound column (ID) is of no use to the users. Serial# is
the only thing they will recognize.

Help is greatly appreciated.

Thank You,
Tim J
  #2  
Old May 26th, 2004, 05:52 PM
Gerald Stanley
external usenet poster
 
Posts: n/a
Default Combo Box Value not Shown

I do not think that it is possible for a bound combo box to
show a value for an existing row if that value is not in
the dropdown list. I have got around this by setting the
combo's RowSource SQL in the Form's Current eventhandler.
The first part of the union ensures that the current
contents of the comboBox appear in the list and the second
part ensures that the other required values appear.

In your case, this would be something like
myCombo.RowSource = "SELECT IDColumn, SerialNumberColumn
FROM MyTable WHERE IDColumn = " & myCombo.Value & " UNION
SELECT SELECT IDcolumn, SerialNumberColumn FROM MyTable
WHERE SerialNumberColumn NOT IN (SELECT SerialNumberColumn
FROM MyOtherTable)

Hope This Helps
Gerald Stanley MCSD
-----Original Message-----
I have a combo box on a form which using a 'not in' qry.

The combo box has two columns, ID and Serial# (which are
in the same table)

ID is hidden in combo box (width set to 0")

ID is the bound column.

The not in query will not allow to select serial# (ID) if
that Serial# exists in the table the form is bound to.

Hence Once a serial# has been selected it may not exist in
another record (no duplicates) and is no longer available
in the list.

The problem I am having is since the Serial# is removed in
the list you can longer see that you have selected it in
the current record.

Is there a way I may fix this. I would rather not have to
create a seperate list or text box to show the selected
value. I would just like it to remain in the combo box
for that record.

Is this happening becuase the bound column is not visible?

bound column (ID) is of no use to the users. Serial# is
the only thing they will recognize.

Help is greatly appreciated.

Thank You,
Tim J
.

 




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 06:15 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.