views:

136

answers:

1

i have a huge sql query that is attached to the rowsource of a listbox.

the SQL statement seen here:

http://stackoverflow.com/questions/1358642/ms-access-select-from-another-query

actually returns the correct information if that information is under 2 records.

however if it returns more than 2 records it still populates the listbox but it populates it with null values. when i right click on one of the values and press COPY, it gives me this message:

"there isnt enough memory to retrieve data for the list box"

+2  A: 

But does the query work if it is run separately? And is the number of columns in the query the same number of columns as you've specified in the listbox Column Count property?

In your reply you state that you have to combine it? Why? Basic trouble shooting is to see if you can run the query separate from the lixtbox.

Tony Toews
i get a data type mismatch on criteria expression error if i run it from the query view
I__
btw i can run the USERS query without a problem
I__
Data type mismatch? Excellent. Fixing that may very well solve the listbox wierdness problems. One thing to check is the field type of the chavrusas.luser_id field. If it's numeric then remove the single quotes around '3166'.
Tony Toews
IT WORKS!!!!!!!!!!!! but i cannot get it to display in listbox
I__
should the column count be exactly the number of columns or is it ok to have more
I__
It's better to have the column count the same. This might not make a difference now but this was a problem years ago in previous versions of Access.
Tony Toews
BTW how many records in the query?
Tony Toews
14 records in query
I__
Nice work, Tony.
HansUp
btw. if you have to use that same query somewhere else, you could always make a second query the selects everything from the first, and has ONLY the columns you need.
CodeSlave