Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Combobox Rowsource yields Unexpected results

Status
Not open for further replies.

JamesDSM50328

Technical User
Mar 25, 2005
33
US
Hi, I have a unbound form that has multiple comboboxes that when selected sets another combobox with it's options, 1 combobox after the rowsource is updated does not have all of the information in the next combobox. This is only happening to a select few. The linked tables on reflect all of the data.
Any Suggestions?
Code:
Private Sub cboAttr1_AfterUpdate()
On Error Resume Next
 Select Case cboAttr1.Value
   Case "Mktg Pgm Group"
     cboValue1.RowSource  "dbo_market_program_group_ref"
     cboValue1.ColumnCount = 1
 End Select
End Sub
 
Interesting... I have only altered selection records displayed but never changed the row source.

Have you tried requerying the combobox?

Code:
cboValue1.requery
 
How are ya JamesDSM50328 . . .

. . . and how about:
Code:
[blue]   cboValue1.RowSource [purple][b]=[/b][/purple] "dbo_market_program_group_ref"[/blue]
If your still having problems post the RowSource for [blue]dbo_market_program_group_ref[/blue] . . .

Calvin.gif
See Ya! . . . . . .

Be sure to see FAQ219-2884:
 
Thanks for your responses, the cboValue1.Rowsource is as you have it, not sure what happend to the "=" sign when I pasted it in, but still the same results, and I have also have tried thr requery and still does not display all of the correct records.

The "dbo_market_program_group_ref" is a linked table. Any additional ideas?


 
Just looked at help for rowsource. How about:

Code:
cboValue1.RowSourceType = "Table/Query"
cboValue1.RowSource  = "dbo_market_program_group_ref"
 
Thanks lameid, I just tried that, still the samething, it looks like I am getting about half of the items that should be populating into the combo, data is still not complete.


Code:
Case "Mktg Pgm Group"
     cboValue1.RowSourceType = "Table/Query"
     cboValue1.RowSource = "dbo_market_program_group_ref"
     cboValue1.ColumnCount = 1

End Select

cboValue1.Requery
 
Does your table return all the results when you open the link?

I was confused about it not displaying all the data, I thought it wouldn't display data...

It should really just work... Is it maybe just returning the top so many values?
 
Thanks again for your responses.
When I open the table it display all the data, but once it is displayed in the combo it removes part of the records. It works on my computer fine but there are a quite a few other people that are having the issue, but if the data can't be trusted...

there are not a lot of items for the combo only around 60 so I don't think it has too much data trying to be displayed.

 
Works differently on different machines...

The other machines may need updated ODBC drivers or if you used a DSN for your link, may have an entirely different database or server specified.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top