By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
426,107 Members | 1,284 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 426,107 IT Pros & Developers. It's quick & easy.

Object variable or Width block variable not set error

P: n/a
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
Share this Question
Share on Google+
8 Replies


P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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.