469,323 Members | 1,522 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,323 developers. It's quick & easy.

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.Properties.Append
CurrentDb.CreateProperty(myPropertyName, dbLong, myValue)

Any ideas why and how to fix would be appreciated.
lq
Nov 12 '05 #1
8 8698
SA
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" <la*************@hotmail.com> wrote in message
news:47**************************@posting.google.c om...
I get the following error:
"Object variable or Width block variable not set error"

trying to run this in my Access2000 .ADP database:
CurrentDb.Properties.Append
CurrentDb.CreateProperty(myPropertyName, dbLong, myValue)

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

Nov 12 '05 #2
Lauren,

What are you trying to do?

--
James Lankford
"SA" <~f***********@nspm.com> wrote in message
news:bn**********@ngspool-d02.news.aol.com...
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" <la*************@hotmail.com> wrote in message
news:47**************************@posting.google.c om...
I get the following error:
"Object variable or Width block variable not set error"

trying to run this in my Access2000 .ADP database:
CurrentDb.Properties.Append
CurrentDb.CreateProperty(myPropertyName, dbLong, myValue)

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


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

CurrentDb.Properties.AppendCurrentDb.CreatePropert y(myPropertyName,
dbLong, myValue)

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

Thanks,
lq


"James Lankford" <dragonzfang@_nospam_.hotmail.com> wrote in message news:<vq************@corp.supernews.com>...
Lauren,

What are you trying to do?

--
James Lankford
"SA" <~f***********@nspm.com> wrote in message
news:bn**********@ngspool-d02.news.aol.com...
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" <la*************@hotmail.com> wrote in message
news:47**************************@posting.google.c om...
I get the following error:
"Object variable or Width block variable not set error"

trying to run this in my Access2000 .ADP database:
CurrentDb.Properties.Append
CurrentDb.CreateProperty(myPropertyName, dbLong, myValue)

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


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

CurrentDb.Properties.AppendCurrentDb.CreatePropert y(myPropertyName,
dbLong, myValue)

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

Thanks,
lq

"James Lankford" <dragonzfang@_nospam_.hotmail.com> wrote in message news:<vq************@corp.supernews.com>...
Lauren,

What are you trying to do?

--
James Lankford
"SA" <~f***********@nspm.com> wrote in message
news:bn**********@ngspool-d02.news.aol.com...
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" <la*************@hotmail.com> wrote in message
news:47**************************@posting.google.c om...
I get the following error:
"Object variable or Width block variable not set error"

trying to run this in my Access2000 .ADP database:
CurrentDb.Properties.Append
CurrentDb.CreateProperty(myPropertyName, dbLong, myValue)

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


Nov 12 '05 #5
Steve,
There must be a way to do this in .ADP?
lq
"SA" <~f***********@nspm.com> wrote in message news:<bn**********@ngspool-d02.news.aol.com>...
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" <la*************@hotmail.com> wrote in message
news:47**************************@posting.google.c om...
I get the following error:
"Object variable or Width block variable not set error"

trying to run this in my Access2000 .ADP database:
CurrentDb.Properties.Append
CurrentDb.CreateProperty(myPropertyName, dbLong, myValue)

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

Nov 12 '05 #6
rkc

"Lauren Quantrell" <la*************@hotmail.com> wrote in message
news:47*************************@posting.google.co m...
Steve,
There must be a way to do this in .ADP?


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

With CurrentProject.Properties
.Add "CurrentMachineName", "Commodore 64"
End With
Nov 12 '05 #7
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" <rk*@yabba.dabba.do.rochester.rr.bomb> wrote in message news:<gO*******************@twister.nyroc.rr.com>. ..
"Lauren Quantrell" <la*************@hotmail.com> wrote in message
news:47*************************@posting.google.co m...
Steve,
There must be a way to do this in .ADP?


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

With CurrentProject.Properties
.Add "CurrentMachineName", "Commodore 64"
End With

Nov 12 '05 #8
la*************@hotmail.com (Lauren Quantrell) wrote in message news:<47**************************@posting.google. com>...
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

Function GetProperty(ByVal strProperty As String)
GetProperty = CurrentProject.Properties(strProperty)
End Function
Nov 12 '05 #9

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by Neo Geshel | last post: by
1 post views Thread by finizaini | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by Gurmeet2796 | last post: by
reply views Thread by mdpf | last post: by
reply views Thread by harlem98 | last post: by
reply views Thread by listenups61195 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.