From: Lori on
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/aspnet/5ac799db-385f-431a-8a45-8b37cb7f3186/wpf-report-engine-part-4.aspx
From: KARL DEWEY on
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/aspnet/5ac799db-385f-431a-8a45-8b37cb7f3186/wpf-report-engine-part-4.aspx
> .
>