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

When I "ORDER BY" my list disappears... 2

Status
Not open for further replies.

JonWolgamuth

Technical User
Apr 19, 2001
53
US
I have a sequel statement assigned to

mstrSQL

and when I call for it using this code

Me!WorkToDoLST.RowSource = mstrSQL

everything in my list box shows up okay. However, if I try to add a sort, such as

Me!WorkToDoLST.RowSource = mstrSQL & "ORDER BY DateIn DESC"

my list disappears. I can't find the problem.

Thanks in advance for any advice anyone can give me!

JW
 
Hi!

I can't say if this is the problem or not but shouldn't you have a space before the Order?

hth
Jeff Bridgham
bridgham@purdue.edu
 
Hi again, Jeff. Thanks for your response. For some reason (I'm sure it is because I copied the line), I do have a space before the ORDER. What purpose does that space serve?

L8R,

JW
 
Hi!

Access will concatenate string exactly as they are so, without the space, the word Order and whatever word ends the original string will be placed together.

BTW, I had another thought. Does the string for the original row source end in a ;? If it does that may be the cause of the problem.

hth
Jeff Bridgham
bridgham@purdue.edu
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top