Im not sure of what you mean. My table uses danish letters and its no problem so far. The pronlem is that i can't assign a value to @Sort in my query, just as I do - without problems - with @Searching. If I ask it to sort/order by Dato, there's no problem. It's the variable aspect that don't work.
When you write [Searching] Then Access Can not find a field with this name so it expects a paramater this is OK in the LIKE clause. This IS NOT allowed in the ORDER BY clause! It HAS to be one of the fields in your table an dit CAN NOT be entered through a paramater. If you want to change the sort field then you have to dynamically create your query!
No, sort is a variable. When I run my query in Access, I'm asked to first input a value for @Searching and secondly one for @Sort. It's just that Access dont grab the value of @Sort which I write. I'm going to use this query from an ASPX-page. And to avoid writing a query for each possible sort-order, I wanted to assign a value through a variable. Now, if you say it's not possible, maybe I should avoid a query and instead create and execute a sql-string from within ASPX.
SELECT sag.Emne, sag.Dato FROM sag WHERE ((sag.Emne) Like "*"+[@Searching]+"*") ORDER BY [@Sort];
In query design view select the check Show box in the column where you can see [@sort] and then run the query. You will now see that whet ever you entered is shown in ALL records and that is why the sort has no effect !!!!
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.