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

Error 2176

Status
Not open for further replies.

TazzMann

Programmer
Jul 25, 2001
79
US
Can anyone tell me what this is supposed to mean?

"The setting for this property is too long"

I get this error when I am populating a combo box using vba. I can post the code if needed, but it is simply pulling out a first and last name from a database, concatenating them and then using that as a list choice in the combobox.

Is there a limit to how long a list text can be?



Tazzmann
 
In access a combo/listbox a RowSource text is limited to about 2k depending of version.
Why not set the RowSource to a SQL instruction, like this:
Me!cboName.RowSource = "SELECT FirstName & ' ' & LastName FROM yourTable"

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
When I do this:

Code:
Me!cboName.RowSource = "SELECT DISTINCT dbo.Table.First_NAME, dbo.Table.Last_NAME FROM dbo.Table Where Branch = " & intBranchNumber & " and Active = 'Y' Order by Last_Name, First_Name"

The SQL text is what shows up in the combobox.

This is Access 2003 and all the tables are linked SQL Server tables. Nothing local.

What am I doing wrong?

P.S. It has been a LONG time since I have used Access (access 97 was the last time I it).

Thanks,


Tazzmann
 
What is the Row Source Type of the combo? With an SQL string, it should be Table/Query.

Roy-Vidar
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top