View Single Post
  #5 (permalink)  
Old June 1st, 2005, 05:16 PM
BrianWren BrianWren is offline
Friend of Wrox
 
Join Date: Nov 2004
Location: Port Orchard, WA, USA.
Posts: 1,621
Thanks: 1
Thanked 3 Times in 3 Posts
Default

Last question 1st: YES!
Use the query builder, then, having created a query, switch to SQL view to see how Access does the task at hand.
You can create queries using query wizards, then open them for design and switch to SQL view to see how that task was done.
This is the best way I know to ascertain Access' way of doing things.




Next, this:
Code:
            k = "select max(nrreferat) as [kk] from tabelreferate;"
            Set dds = ds.OpenRecordset(k)
            myY = dds!kk
            could be
Code:
            k = "SELECT MAX(nrreferat) FROM tabelreferate;"
Code:
            Set dds = ds.OpenRecordset(k)
            myY = dds.Fields(0)
            ' Or (I believe):
            myY = dds(0)
            If you only use k one time, I would probably just put the literal string in the .OpenRecordset() call.
Reply With Quote