[AccessD] RE: A2k2 combo boxes / rowsource hassles

Tom Bolton tom.bolton at donnslaw.co.uk
Thu Jan 27 11:23:13 CST 2005


John, Lambert

That's exactly what was happening - I thought the column count was just for
displaying, not binding as well.

Many thanks for all your help chaps!

Cheers 
Tom


-----Original Message-----
From: John W. Colby [mailto:jwcolby at colbyconsulting.com] 
Sent: 27 January 2005 17:13
To: 'Access Developers discussion and problem solving'
Subject: RE: [AccessD] RE: A2k2 combo boxes / rowsource hassles

In order to be able to reference three columns in code, you must set column
count to 3.  If you don't want any given column displayed, set the width of
that column to zero.  If you only have column count = 2 then you can only
reference two columns (0 and 1) in the cbo.column(x) syntax.

It sounds like you have column count set to 2.

John W. Colby
www.ColbyConsulting.com 

Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Tom Bolton
Sent: Thursday, January 27, 2005 11:45 AM
To: 'Access Developers discussion and problem solving'
Subject: RE: [AccessD] RE: A2k2 combo boxes / rowsource hassles


Neal and Gustav - many thanks for quick replies!

.Column(0) contains a value for the column [Alias], .Column(1) contains a
value for the column [FieldName], alas .Column(2) returns NULL every time! I
checked the query is valid, and it returns data for all 3 columns...

Andy, John - many thanks also

I'm not wanting the combo to display the three columns, just wanting to
display one column and have associated data with that column (e.g. the other
2 columns) - the combo is displaying a friendly alias, but by using the
.Columns(x) syntax I can (or can't, as the case is) get at the other info.

Cheers!  Hope this makes sense, BTW...
Tom




-----Original Message-----
From: Neal Kling [mailto:nkling at co.montgomery.ny.us] 
Sent: 27 January 2005 16:30
To: Access Developers discussion and problem solving
Subject: RE: [AccessD] RE: A2k2 combo boxes / rowsource hassles

Did you remember that the Columns property is Zero based?

.Column(0) = first column
.Column(1) = second column
etc.

Neal

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Tom Bolton
Sent: Thursday, January 27, 2005 11:23 AM
To: 'Access Developers discussion and problem solving'
Subject: [AccessD] RE: A2k2 combo boxes / rowsource hassles


Hi guys

 

I have a problem with setting the rowsource property of a combo at runtime -
I'm binding it to the SQL query shown below:

 

SELECT tblAdmin_ColumnLookup.Alias, tblAdmin_ColumnLookup.FieldName,
tblAdmin_ColumnLookup.[DataType] FROM tblAdmin_SQLData INNER JOIN
tblAdmin_ColumnLookup ON tblAdmin_SQLData.ID = tblAdmin_ColumnLookup.SQLID
WHERE tblAdmin_SQLData.ReportID = 5 AND
tblAdmin_ColumnLookup.IncludeInTemplate=True

 

The first 2 columns are there using myCombo.Columns(x), but the third...
nowhere to be seen.  I'm tearing my hair out here!!

 

Any help appreciated, TIA

Tom 

 

 

 

Tom Bolton

Systems Developer (I.T.)

Donns Solicitors

Tel: 0161 834 3311

Fax: 0161 834 2317

 

 

-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com


-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com
-------------- next part --------------

The contents of this message and any attachments are the property of Donns Solicitors 
and are intended for the confidential use of the named recipient only.  They may be legally
 privileged and should not be communicated to, or relied upon, by any other party without 
our written consent.  If you are not the addressee, please notify us immediately so that we 
can make arrangements for its return.  You should not show this e-mail to any person or
 take copies as you may be committing a criminal or civil offence for which you may be
 liable.  The statement and opinions expressed in this e-mail message are those of the 
writer, and do not necessarily represent that of Donns Solicitors.  Although any files attached
 to this e-mail will have been checked with virus protection software prior to transmission, 
you should carry out your own virus check before opening any attachment.  
Donns Solicitors does not accept any liability for any damage or loss which may be caused 
by software viruses...


More information about the AccessD mailing list