Re: Make Table Query - Sorting Errors



Why not use:
Set InputTable = mydb.OpenRecordset("SELECT * FROM tblRecallQuery ORDER BY
CAMPNO")


--
Duane Hookom
MS Access MVP
--

"Fred" <Fred@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:7E554B2C-AB4F-4C09-846E-53E60E966D15@xxxxxxxxxxxxxxxx
Not trying to keep the module code a secret, it's just rather long....but
if
you insist...here it is...

Dim InputTable As DAO.Recordset
Dim OutputTable As DAO.Recordset
Dim MySet As DAO.Recordset
Dim dbcurrent As DAO.Database
Dim mydb As DAO.Database
Dim myworkspace As DAO.Workspace

Set myworkspace = DBEngine.Workspaces(0)
Set mydb = myworkspace.Databases(0)

' *****************************
' * Open table tblRecallQuery *
' *****************************
DoCmd.Echo False, "opening tblRecallQuery..."
Set InputTable = mydb.OpenRecordset("tblRecallQuery")


.



Relevant Pages

  • Re: MultiSelect List code
    ... In your module go to Tools, References and tick the box if necessary ... > Dim MyDB As DAO.Database ... > Dim rstSelectedCat As DAO.Recordset ... > Private Sub cmdOption1_Click ...
    (microsoft.public.access.formscoding)
  • MultiSelect List code
    ... I used the code created by Roger Carlson (suggested to ... Dim MyDB As DAO.Database ... Dim rstSelectedCat As DAO.Recordset ... Private Sub cmdOption1_Click ...
    (microsoft.public.access.formscoding)
  • RE: Recordset
    ... dim sqlquery as string ... dim myset as recordset ... > dim mydb as database ... > dim myset as recordset ...
    (microsoft.public.access.formscoding)
  • Re: Permission Error
    ... Dim myWorkspace as DAO.Workspace ... Dim mydb As DAO.Database ... Dim mytbl As DAO.TableDef ... Dim myname As String ...
    (microsoft.public.access.modulesdaovba)
  • Re: too few parameters error
    ... > Dim MyWksp As Workspace ... > Dim MyDB As Database ... > Dim MySQL As String, MyCriteria As String ...
    (microsoft.public.access.formscoding)

Loading