Rabu, 10 Juli 2013

RE: [MS_AccessPros] combo box Access bug?

 

I'm not sure I understand but if your combo box is bound to the first column, every one of the values in the first column should be unique. If not, you will not get consistent results. You have multiple items in the combo that would have the same value.

I would minimally combine the two columns into a single expression (column width of 0) and use this unique combination as the bound column.

Duane Hookom MVP
MS Access

----------------------------------------
> From: liz_ravenwood@beaerospace.com
>
> Pros, I think I found an Access bug but I still need to work around it.
>
> I have a combo box with this query at the data:
>
> SELECT ReportCode as Selection, "Program" as Selected FROM ProgCodesActive
> UNION SELECT AffectedArea as Selection, "Area" as Selected FROM AffectedAreasAndEmailsNogales;
>
> And yields results like this:
>
> Selection
> Selected
>
> Asiana
> Area
>
> Asiana
> Program
>
> BA
> Area
>
> BA
> Program
>
> Emirates
> Area
>
> Emirates
> Program
>
> Etihad
> Area
>
> Etihad
> Program
>
> Etihad A380
> Program
>
> Etihad B787
> Program
>
> Garuda
> Area
>
> Garuda
> Program
>
> JAL
> Area
>
> Japan B777
> Program
>
> However, I can IMMEDIATELY check what was selected and if I select the Emirates/Program, I can see that it is reset to Emirates/Area. My subsequent code doesn't work by calling column 1 as an argument because it isn't set.
>
> Call SetQueryDef("All", Nz(Me.cboType, ""), Nz(Me.cboReportCode.Column(1), ""), Nz(Me.cboReportCode, ""))
> DoCmd.OpenQuery "forReports" & strWho, acViewNormal, acReadOnly
>
>
> Respectfully,
> Liz Ravenwood

__._,_.___
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (5)
Recent Activity:
.

__,_._,___

Tidak ada komentar:

Posting Komentar