|
-
Nov 14th, 2002, 08:05 PM
#1
Thread Starter
Addicted Member
A Quickie
I've been attempting to relate two recordsets in order to take advantage of the relational aspects of my database.
This wasn't terribly difficult in the end, & I've managed to create a recordset that I'm happy with. The problem is that I'd like to use the SQL ORDER BY function to order the recordset by [JOB NUMBER]. However, I'm finding it hard to get the correct syntax because of the other elements I've had to put into my query. Does anyone have a quick fix?
The code is below.
Thanks.
Sam
VB Code:
ClientIndex = rec3ClientDetails("ID")
str2Query = "SELECT * FROM [RECORDDETAILS] WHERE [CLIENT DETAILS] = " & ClientIndex
Set rec3IndivRecords = dba3Database.OpenRecordset(str2Query, dbOpenDynaset)
-
Nov 14th, 2002, 08:24 PM
#2
Fanatic Member
[Highlight=VB]
str2Query = "SELECT * FROM [RECORDDETAILS] WHERE [CLIENT DETAILS] = " & ClientIndex & " order by <fieldname>"
is this what you are talking about??
-
Nov 14th, 2002, 08:28 PM
#3
Thread Starter
Addicted Member
I think it might just well be. I was trying to arrange the phrase in every possible way but it wasn't working. I haven't tried this one & it seems to make a lot of sense.
Thanks.
I'm off to plug it in & see what happens.
Sam
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|