DataBase linking

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • the chiller

    #16
    Re: DataBase linking

    guess you'll have to figure that one out on your own, as I can't
    possibly know what code line is causing the error (just debug it).
    Don't forget, in your ShipmentRequest method you must still use
    ..FindFirst to jump to the right customer record.

    Comment

    • Justin Hoffman

      #17
      Re: DataBase linking


      "the chiller" <timedilation@g mail.com> wrote in message
      news:1123267210 .951534.310010@ g43g2000cwa.goo glegroups.com.. .[color=blue]
      > If you are using a form, simply bind the form's recordset to the linked
      > table, and you should have access to those fields with Me.Whatever.
      >
      > The other way would be:
      > Dim rst as Recordset
      > Set rst = CurrentDB.OpenR ecordset("Linke dTableName")
      >
      > Now you reference any field with rst.Fields("Fie ldName").
      > Just remember to do this when you're done (i like to encourage good
      > programming practice):
      > rst.Close
      > Set rst = Nothing
      >
      > The final method, completely independent of linked tables, I posted a
      > function for before.[/color]


      (i like to encourage good programming practice):
      Then why not write:
      Dim rst As DAO.Recordset
      or
      Dim rst As ADODB.Recordset
      so there is no ambiguity as to whether you are using the DAO or ADO object
      model?


      Comment

      • Bryan  via AccessMonster.com

        #18
        Re: DataBase linking

        Thank you.
        I figured the first part out, i had to had the ms DAO 3.6 library, and then
        use dim dao.recordset

        thanks again
        bryan

        the chiller wrote:[color=blue]
        >guess you'll have to figure that one out on your own, as I can't
        >possibly know what code line is causing the error (just debug it).
        >Don't forget, in your ShipmentRequest method you must still use
        >.FindFirst to jump to the right customer record.[/color]


        --
        Message posted via AccessMonster.c om

        Comment

        • Justin Hoffman

          #19
          Re: DataBase linking

          "Bryan via AccessMonster.c om" <forum@AccessMo nster.com> wrote in message
          news:5266B6B9AD AB4@AccessMonst er.com...[color=blue]
          > Private Sub ShipmentRequest _Click()
          > Dim rst As Recordset
          > Set rst = CurrentDb.OpenR ecordset("custo merdbnew")
          >
          > This is how i started the new sub.. . .except it is giving me a type
          > mismatch
          > error. Thanks again for all the help!
          >
          > Bryan[/color]

          When viewing the code, select Tools>Reference s and uncheck:
          Microsoft ActiveX Data Objects 2.1 Library
          and add a reference to:
          Microsoft DAO 3.6 Object Library

          Then change the code to
          Dim rst As DAO.Recordset
          make sure it copiles first (Debug>Compile)


          Comment

          Working...