Refreshing after SQL Select Sort

fteng
10-10-2000, 01:56 PM
I get this nasty message: Run-time error '3450': Syntax error in query. Incomplete query clause.
after clicking the cmdSort database button. Here's what the code looks like:

Private Sub cmdSort_Click()
datClients(1).RecordSource = "SELECT * FROM 'Client Info' ORDER BY 'Name' ASC"
datClients(1).Refresh
End Sub

but the debugger is saying there's a problem with the "datClients(1).refresh" line

help !

niktesla
10-11-2000, 11:38 PM
First Try
"SELECT * FROM 'Client Info' ORDER BY Name ASC"
Then Try
"SELECT * FROM [Client Info] ORDER BY Name ASC"

I'm pretty sure that the SQL engine thinks that 'Name' is a value, not a field name.
I'm not so sure about 'Client Info', but it is probably the same problem.

Good Luck,
Brian



Brian T. Wiehoff

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum