-
In my program I wrote the next sentences:
Set NewWS = DBEngine.Workspaces(0)
Set NewDB = NewWS.OpenDatabase(MY.MDB)
TempStr = "select * from MyTable"
Set NewDyn = NewDb.OpenRecordset(TempStr)
How can I sort on one or two fields?
How can I filter some information from a field?
I hope you will give an answere.
Greetings,
Ingrid.
-
Sorting
TempStr = "select * from MyTable order by Field1"
Filtering
TempStr = "select * from MyTable where Field1 like 'str*'"
------------------
smalig
[email protected]
smalig.tripod.com
-
You can user WHERE clause to filter data and ORDER BY to sort data in your SQL statement. Let's say: you want to get the list of all employees from EMPLOYEE whose name starts with A. Your SQL statement will look like:
SELECT * FROM EMPLOYEE
WHERE EMP_NAM LIKE 'A%'
ORDER BY EMP_NAM
HTH!!!
-
In ms access LIKE 'A%' not working.
------------------
smalig
[email protected]
smalig.tripod.com