String modification problem

polina

Registered User.
Local time
Today, 11:24
Joined
Aug 21, 2002
Messages
100
Hi,

I have this problem.
My list has a query as its source code. (For example: Select * from charges where AssetType = "Monitor";)

You've noticed that there is a semi-colon that gets assigned at the end by Access 97 (there is not semi-colon at the end of the query's SQL in Access 2000)

I have a button on the form that sorts the first column

The code under this button is:

sql=List.RowSource

List.RowSourse = sql & " Order By Name"

That is where the problem with semi-colon comes in.

I get the following RowSource:
Select * from charges where AssetType = "Monitor"; Order by Name

How would I get rid of that semi-colon?

Please note that don't want to hardcode the SQL myself instead of using this line sql=List.RowSource.

Thanks.
 
Search for it with the instr function and then delete it or set that byte to null.
 

Users who are viewing this thread

Back
Top Bottom