Object variable or Width block variable not set error

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Lauren Quantrell

    Object variable or Width block variable not set error

    I get the following error:
    "Object variable or Width block variable not set error"

    trying to run this in my Access2000 .ADP database:
    CurrentDb.Prope rties.Append
    CurrentDb.Creat eProperty(myPro pertyName, dbLong, myValue)

    Any ideas why and how to fix would be appreciated.
    lq
  • SA

    #2
    Re: Object variable or Width block variable not set error

    Lauren:

    In an ADP database, even if you try to reference CurrentDB it will not
    create an appropriate refernce to the ADP database container so you can not
    create database properties in an ADP in that manner.
    --
    Steve Arbaugh
    ACG Soft


    "Lauren Quantrell" <laurenquantrel l@hotmail.com> wrote in message
    news:47e5bd72.0 310301234.64009 2de@posting.goo gle.com...[color=blue]
    > I get the following error:
    > "Object variable or Width block variable not set error"
    >
    > trying to run this in my Access2000 .ADP database:
    > CurrentDb.Prope rties.Append
    > CurrentDb.Creat eProperty(myPro pertyName, dbLong, myValue)
    >
    > Any ideas why and how to fix would be appreciated.
    > lq[/color]


    Comment

    • James Lankford

      #3
      Re: Object variable or Width block variable not set error

      Lauren,

      What are you trying to do?

      --
      James Lankford


      "SA" <~fake.address@ nspm.com> wrote in message
      news:bntee9$fvd $1@ngspool-d02.news.aol.co m...[color=blue]
      > Lauren:
      >
      > In an ADP database, even if you try to reference CurrentDB it will not
      > create an appropriate refernce to the ADP database container so you can[/color]
      not[color=blue]
      > create database properties in an ADP in that manner.
      > --
      > Steve Arbaugh
      > ACG Soft
      > http://ourworld.compuserve.com/homepages/attac-cg
      >
      > "Lauren Quantrell" <laurenquantrel l@hotmail.com> wrote in message
      > news:47e5bd72.0 310301234.64009 2de@posting.goo gle.com...[color=green]
      > > I get the following error:
      > > "Object variable or Width block variable not set error"
      > >
      > > trying to run this in my Access2000 .ADP database:
      > > CurrentDb.Prope rties.Append
      > > CurrentDb.Creat eProperty(myPro pertyName, dbLong, myValue)
      > >
      > > Any ideas why and how to fix would be appreciated.
      > > lq[/color]
      >
      >[/color]


      Comment

      • Lauren Quantrell

        #4
        Re: Object variable or Width block variable not set error

        James,
        I'm trying to create some custom properties in my Access2000 .ADP
        database to handle stored information such as CurrentUserID,
        CurrentMachineN ame, etc. Certainly this must be available in an
        ..adp??? In the past (.mdb), this was done using the code below:

        CurrentDb.Prope rties.AppendCur rentDb.CreatePr operty(myProper tyName,
        dbLong, myValue)

        In Access2000 .adp I get the following error:
        "Object variable or With block variable not set error"

        Thanks,
        lq




        "James Lankford" <dragonzfang@_n ospam_.hotmail. com> wrote in message news:<vq4sm73dk 2otcd@corp.supe rnews.com>...[color=blue]
        > Lauren,
        >
        > What are you trying to do?
        >
        > --
        > James Lankford
        >
        >
        > "SA" <~fake.address@ nspm.com> wrote in message
        > news:bntee9$fvd $1@ngspool-d02.news.aol.co m...[color=green]
        > > Lauren:
        > >
        > > In an ADP database, even if you try to reference CurrentDB it will not
        > > create an appropriate refernce to the ADP database container so you can[/color]
        > not[color=green]
        > > create database properties in an ADP in that manner.
        > > --
        > > Steve Arbaugh
        > > ACG Soft
        > > http://ourworld.compuserve.com/homepages/attac-cg
        > >
        > > "Lauren Quantrell" <laurenquantrel l@hotmail.com> wrote in message
        > > news:47e5bd72.0 310301234.64009 2de@posting.goo gle.com...[color=darkred]
        > > > I get the following error:
        > > > "Object variable or Width block variable not set error"
        > > >
        > > > trying to run this in my Access2000 .ADP database:
        > > > CurrentDb.Prope rties.Append
        > > > CurrentDb.Creat eProperty(myPro pertyName, dbLong, myValue)
        > > >
        > > > Any ideas why and how to fix would be appreciated.
        > > > lq[/color]
        > >
        > >[/color][/color]

        Comment

        • Lauren Quantrell

          #5
          Re: Object variable or Width block variable not set error

          James,
          I'm trying to create some custom properties in my Access2000 .ADP
          database to handle stored information such as CurrentUserID,
          CurrentMachineN ame, etc. Certainly this must be available in an
          ..adp??? In the past (.mdb), this was done using the code below:

          CurrentDb.Prope rties.AppendCur rentDb.CreatePr operty(myProper tyName,
          dbLong, myValue)

          In Access2000 .adp I get the following error:
          "Object variable or With block variable not set error"

          Thanks,
          lq

          "James Lankford" <dragonzfang@_n ospam_.hotmail. com> wrote in message news:<vq4sm73dk 2otcd@corp.supe rnews.com>...[color=blue]
          > Lauren,
          >
          > What are you trying to do?
          >
          > --
          > James Lankford
          >
          >
          > "SA" <~fake.address@ nspm.com> wrote in message
          > news:bntee9$fvd $1@ngspool-d02.news.aol.co m...[color=green]
          > > Lauren:
          > >
          > > In an ADP database, even if you try to reference CurrentDB it will not
          > > create an appropriate refernce to the ADP database container so you can[/color]
          > not[color=green]
          > > create database properties in an ADP in that manner.
          > > --
          > > Steve Arbaugh
          > > ACG Soft
          > > http://ourworld.compuserve.com/homepages/attac-cg
          > >
          > > "Lauren Quantrell" <laurenquantrel l@hotmail.com> wrote in message
          > > news:47e5bd72.0 310301234.64009 2de@posting.goo gle.com...[color=darkred]
          > > > I get the following error:
          > > > "Object variable or Width block variable not set error"
          > > >
          > > > trying to run this in my Access2000 .ADP database:
          > > > CurrentDb.Prope rties.Append
          > > > CurrentDb.Creat eProperty(myPro pertyName, dbLong, myValue)
          > > >
          > > > Any ideas why and how to fix would be appreciated.
          > > > lq[/color]
          > >
          > >[/color][/color]

          Comment

          • Lauren Quantrell

            #6
            Re: Object variable or Width block variable not set error

            Steve,
            There must be a way to do this in .ADP?
            lq


            "SA" <~fake.address@ nspm.com> wrote in message news:<bntee9$fv d$1@ngspool-d02.news.aol.co m>...[color=blue]
            > Lauren:
            >
            > In an ADP database, even if you try to reference CurrentDB it will not
            > create an appropriate refernce to the ADP database container so you can not
            > create database properties in an ADP in that manner.
            > --
            > Steve Arbaugh
            > ACG Soft
            > http://ourworld.compuserve.com/homepages/attac-cg
            >
            > "Lauren Quantrell" <laurenquantrel l@hotmail.com> wrote in message
            > news:47e5bd72.0 310301234.64009 2de@posting.goo gle.com...[color=green]
            > > I get the following error:
            > > "Object variable or Width block variable not set error"
            > >
            > > trying to run this in my Access2000 .ADP database:
            > > CurrentDb.Prope rties.Append
            > > CurrentDb.Creat eProperty(myPro pertyName, dbLong, myValue)
            > >
            > > Any ideas why and how to fix would be appreciated.
            > > lq[/color][/color]

            Comment

            • rkc

              #7
              Re: Object variable or Width block variable not set error


              "Lauren Quantrell" <laurenquantrel l@hotmail.com> wrote in message
              news:47e5bd72.0 310311250.c75f6 e5@posting.goog le.com...[color=blue]
              > Steve,
              > There must be a way to do this in .ADP?[/color]

              You can add properties to the CurrentProject. Properties collection
              using CurrentProject. Properties.Add

              With CurrentProject. Properties
              .Add "CurrentMachine Name", "Commodore 64"
              End With


              Comment

              • Lauren Quantrell

                #8
                Re: Object variable or Width block variable not set error

                Thanks,
                That does the trick. But now, how do I make the value persistent
                between client sessions? (so that if a user sets the value, then
                exists Access, the value is retained the next time the ADP project is
                run...)
                lq


                "rkc" <rkc@yabba.dabb a.do.rochester. rr.bomb> wrote in message news:<gOAob.245 55$ZC4.15385@tw ister.nyroc.rr. com>...[color=blue]
                > "Lauren Quantrell" <laurenquantrel l@hotmail.com> wrote in message
                > news:47e5bd72.0 310311250.c75f6 e5@posting.goog le.com...[color=green]
                > > Steve,
                > > There must be a way to do this in .ADP?[/color]
                >
                > You can add properties to the CurrentProject. Properties collection
                > using CurrentProject. Properties.Add
                >
                > With CurrentProject. Properties
                > .Add "CurrentMachine Name", "Commodore 64"
                > End With[/color]

                Comment

                • Pieter Linden

                  #9
                  Re: Object variable or Width block variable not set error

                  laurenquantrell @hotmail.com (Lauren Quantrell) wrote in message news:<47e5bd72. 0311080625.427d 6009@posting.go ogle.com>...[color=blue]
                  > Thanks,
                  > That does the trick. But now, how do I make the value persistent
                  > between client sessions? (so that if a user sets the value, then
                  > exists Access, the value is retained the next time the ADP project is
                  > run...)
                  > lq
                  >
                  >[/color]
                  Function GetProperty(ByV al strProperty As String)
                  GetProperty = CurrentProject. Properties(strP roperty)
                  End Function

                  Comment

                  Working...