PC Review


Reply
Thread Tools Rate Thread

Combo Box not displaying properly

 
 
Lori Robinson
Guest
Posts: n/a
 
      22nd Apr 2010
I have a cbo (cboID_Start) that has the row source:

SELECT capture_id FROM dtGPSDataNew WHERE capture_id = 178 ORDER BY date_gps

Capture_id is identified when the user selects it from a previous cbo (cbocapture_ID), and this simple code links them:

Me.cboGPS_ID_start.RowSource = "SELECT capture_id
FROM " & _"
dtGPSDataNew WHERE capture_id = " & _
Me.cbocapture_id
& _ " ORDER BY date_gps"

After the user selects a value in cbocapture_id, and then goes to the cboID_Start box to select the data he/she wants, only the first column of 3 is visible. All records seem to be there, but only the bound (1st) column shows any data. The column widths are set adequately and I have tried to put that in the code too, just to make sure.

cboID_start.ColumnWidths = "1cm;1.6cm;1.6cm"

This doesn't seem to happen if the cbocapture_id box is empty (i.e. all columns show up with all data). But, as soon as the code runs, it affects the column views. I'm sure it's simple (obviously I don't do a tonne of this) and I'm missing something obvious.

Help very much appreciated!



Submitted via EggHeadCafe - Software Developer Portal of Choice
WPF Report Engine, Part 4
http://www.eggheadcafe.com/tutorials...ne-part-4.aspx
 
Reply With Quote
 
 
 
 
KARL DEWEY
Guest
Posts: n/a
 
      22nd Apr 2010
The SQL needs to include the other two column names.
SELECT capture_id, NameCol2, NameCol3 FROM dtGPSDataNew WHERE capture_id =
178 ORDER BY date_gps;

This SQL statement has criteria to olny select capture_id = 178, so how can
you really use it?

--
Build a little, test a little.


"Lori Robinson" wrote:

> I have a cbo (cboID_Start) that has the row source:
>
> SELECT capture_id FROM dtGPSDataNew WHERE capture_id = 178 ORDER BY date_gps
>
> Capture_id is identified when the user selects it from a previous cbo (cbocapture_ID), and this simple code links them:
>
> Me.cboGPS_ID_start.RowSource = "SELECT capture_id
> FROM " & _"
> dtGPSDataNew WHERE capture_id = " & _
> Me.cbocapture_id
> & _ " ORDER BY date_gps"
>
> After the user selects a value in cbocapture_id, and then goes to the cboID_Start box to select the data he/she wants, only the first column of 3 is visible. All records seem to be there, but only the bound (1st) column shows any data. The column widths are set adequately and I have tried to put that in the code too, just to make sure.
>
> cboID_start.ColumnWidths = "1cm;1.6cm;1.6cm"
>
> This doesn't seem to happen if the cbocapture_id box is empty (i.e. all columns show up with all data). But, as soon as the code runs, it affects the column views. I'm sure it's simple (obviously I don't do a tonne of this) and I'm missing something obvious.
>
> Help very much appreciated!
>
>
>
> Submitted via EggHeadCafe - Software Developer Portal of Choice
> WPF Report Engine, Part 4
> http://www.eggheadcafe.com/tutorials...ne-part-4.aspx
> .
>

 
Reply With Quote
 
Lori Robinson
Guest
Posts: n/a
 
      23rd Apr 2010
Fabulous! See? - so easy, but I just didn't know where to put that information! Thanks a lot.

Also, I guess I shouldn't have included the row source information because that's defined in the VB code anyway, and it's dependent on what I put in the first combo box (I had 178 in the first box when I copied the row source information). Anyway, your solution is perfect - thanks so much ... slowly, slowly learning!



KARL DEWEY wrote:

The SQL needs to include the other two column names.
22-Apr-10

The SQL needs to include the other two column names
SELECT capture_id, NameCol2, NameCol3 FROM dtGPSDataNew WHERE capture_id
178 ORDER BY date_gps

This SQL statement has criteria to olny select capture_id = 178, so how ca
you really use it

-
Build a little, test a little

"Lori Robinson" wrote:

Previous Posts In This Thread:


Submitted via EggHeadCafe - Software Developer Portal of Choice
Excel 2007 Filter Tool
http://www.eggheadcafe.com/tutorials...lter-tool.aspx
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
IE 7 not displaying ASP.NET properly Jim in Arizona Microsoft ASP .NET 0 15th Apr 2008 10:32 PM
icons not displaying properly =?Utf-8?B?QnJpYW4gUi4=?= Windows XP General 5 30th May 2007 11:22 PM
NOT DISPLAYING PROPERLY =?Utf-8?B?Q2hyaXM=?= Windows XP General 1 22nd Jul 2004 03:35 AM
Mail sig not displaying properly Dave Microsoft Outlook Discussion 0 7th Jul 2004 04:55 AM
IE 6.0 not displaying properly Art Layton Windows XP Internet Explorer 1 25th Mar 2004 02:10 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:48 PM.