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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting a column exceeding 255 characters 1

Status
Not open for further replies.

zevw

MIS
Jul 3, 2001
697
US
I have a value list in a combo box with 4 columns


15;"Reffered to - Year - Month - Day of week - Time of Day - Affiliation - Gender - Age - Class - Sub Class";"[Counselors].[LastName] & ' ' & [Counselors].[Title] & ' ' & [Counselors].[FirstName],Cases.DtYr, Cases.DtMn,Weekday(Cases.CaseDate),Cases.CaseTime,Cases.Affiliation,Gender.Gender,Cases.Age,Classes.Class,SubClasses.SubClass";"[Counselors].[LastName] & ' ' & [Counselors].[Title] & ' ' & [Counselors].[FirstName] AS Grp1,Cases.DtYr AS Grp2,Cases.DtMn AS Grp3, Weekday(Cases.CaseDate) AS Grp4,Cases.CaseTime AS Grp5, Cases.Affiliation AS Grp6,Gender.Gender AS Grp7,Cases.Age AS Grp8, Classes.Class AS Grp9,SubClasses.SubClass AS Grp10"


and I am referring in my code to column 4 of the value list which has more than 255 characters and when I try to refer to it in a sql string it only gives me up 255 characters . How can I get all the characters in that column?

Here is my sql string with code

Code:
SqlText = "SELECT Count(Cases.CaseDate) AS CntNo, " & [COLOR=red]Me.Grp.Column(3)[/color] & " FROM (((((Cases LEFT JOIN CaseIntake ON Cases.RecId = CaseIntake.RecId) LEFT JOIN CaseInfo ON Cases.RecId = CaseInfo.RecId) " _
& "LEFT JOIN Counselors ON Cases.RefferedTo = Counselors.CounselorId) LEFT JOIN Gender ON Cases.Gender = Gender.GenId) LEFT JOIN Classes ON Cases.Class = Classes.ClassId) LEFT JOIN SubClasses ON " _
& "Cases.SubClass = SubClasses.SubId"
 
You mean you have a table or query that is the row source for the combo and not a value list right?

This is new to me but apparently the combo object must be limited to having columns no bigger than 255 characters which is at least plausible. That would mean the only way to get at the value would be to use a recordset of dlookup to find it. In this scenario, I think I would use Dlookup. You might as well get rid of the column from the row source too.
 
Thanks, thought if I can type it than it can also get the whole string.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top