473,324 Members | 2,124 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

Database properties

I wish to control which users can and cannot alter the toolbars. The
opening popup window invites them to login. Immediately after this, I
have the code:

CurrentDb.Properties("AllowToolbarChanges") = isManager
CurrentDb.Properties.Refresh

isManager is a function that returns true/false

This works (up to a point) but I am caught by the final line in the
Help that says:
"This property's setting doesn't take effect until the next time the
database opens"

So, it would seem that I have to quit the database and get the user to
log in again. (But then, of course, not repeat this procedure!)

Is there any way in which this change can be made for the current user
without them having to log in again?

Or is it possible to quit and then (from code) automatically log that
user in again?
Jul 29 '08 #1
7 2968
I execute that type of code on the copy used to update the end-user's
front-end. That way they have the settings on the 1st login.

"Jim Devenish" <in***************@foobox.comwrote in message
news:91**********************************@c58g2000 hsc.googlegroups.com...
I wish to control which users can and cannot alter the toolbars. The
opening popup window invites them to login. Immediately after this, I
have the code:

CurrentDb.Properties("AllowToolbarChanges") = isManager
CurrentDb.Properties.Refresh

isManager is a function that returns true/false

This works (up to a point) but I am caught by the final line in the
Help that says:
"This property's setting doesn't take effect until the next time the
database opens"

So, it would seem that I have to quit the database and get the user to
log in again. (But then, of course, not repeat this procedure!)

Is there any way in which this change can be made for the current user
without them having to log in again?

Or is it possible to quit and then (from code) automatically log that
user in again?

Jul 29 '08 #2
On Jul 29, 1:10*pm, "paii, Ron" <n...@no.comwrote:
I execute that type of code on the copy used to update the end-user's
front-end. That way they have the settings on the 1st login.

"Jim Devenish" <internet.shopp...@foobox.comwrote in message

news:91**********************************@c58g2000 hsc.googlegroups.com...
I wish to control which users can and cannot alter the toolbars. *The
opening popup window invites them to login. *Immediately after this, I
have the code:
CurrentDb.Properties("AllowToolbarChanges") = isManager
CurrentDb.Properties.Refresh
isManager is a function that returns true/false
This works (up to a point) but I am caught by the final line in the
Help that says:
"This property's setting doesn't take effect until the next time the
database opens"
So, it would seem that I have to quit the database and get the user to
log in again. (But then, of course, not repeat this procedure!)
Is there any way in which this change can be made for the current user
without them having to log in again?
Or is it possible to quit and then (from code) automatically log that
user in again?
But this assumes that a particular front-end (on a specific machine)
is only used by one user. This is not the case here. Different users
may, from time to time, log in to a specific front-end. I want to
have the behaviour different for each user - not for each front-end.

Jim

Jul 29 '08 #3
"Jim Devenish" <in***************@foobox.comwrote in message
news:91**********************************@c58g2000 hsc.googlegroups.com...
>I wish to control which users can and cannot alter the toolbars. The
opening popup window invites them to login. Immediately after this, I
have the code:

CurrentDb.Properties("AllowToolbarChanges") = isManager
CurrentDb.Properties.Refresh

isManager is a function that returns true/false

This works (up to a point) but I am caught by the final line in the
Help that says:
"This property's setting doesn't take effect until the next time the
database opens"
Well it's a start-up option so that makes sense. Is it worth considering a
"manager's" toolbar requirements and providing them on custom toolbars?

Regards,
Keith.
www.keithwilby.com

Jul 29 '08 #4
"Jim Devenish" <in***************@foobox.comwrote in message
news:91**********************************@c58g2000 hsc.googlegroups.com...
>I wish to control which users can and cannot alter the toolbars. The
opening popup window invites them to login. Immediately after this, I
have the code:

CurrentDb.Properties("AllowToolbarChanges") = isManager
CurrentDb.Properties.Refresh

isManager is a function that returns true/false

This works (up to a point) but I am caught by the final line in the
Help that says:
"This property's setting doesn't take effect until the next time the
database opens"

So, it would seem that I have to quit the database and get the user to
log in again. (But then, of course, not repeat this procedure!)

Is there any way in which this change can be made for the current user
without them having to log in again?

Or is it possible to quit and then (from code) automatically log that
user in again?
You can't just set a custom object property without first creating it.
Here's a module which will give you the ability to set, get and delete
object properties:

http://www.smccall.demon.co.uk/Objects.htm#ObjFuncs

Using that, all you need is:

SetObjProp CurrentDb, "AllowToolbarChanges", True

then, to verify it:

Debug.Print GetObjProp(CurrentDb, "AllowToolbarChanges", false)
Result: True

Notice that the line in help that you mentioned is *wrong*. As soon as you
either create or alter an object's properties, the changes are made
available. They will survive a database restart, though.

Also if you're going to refresh the properties collection (I've never found
it to be necessary), you're better off doing it before the assignment rather
than afterward.
Jul 29 '08 #5
On Jul 29, 2:56*pm, "Stuart McCall" <smcc...@myunrealbox.comwrote:
"Jim Devenish" <internet.shopp...@foobox.comwrote in message

news:91**********************************@c58g2000 hsc.googlegroups.com...
I wish to control which users can and cannot alter the toolbars. *The
opening popup window invites them to login. *Immediately after this, I
have the code:
CurrentDb.Properties("AllowToolbarChanges") = isManager
CurrentDb.Properties.Refresh
isManager is a function that returns true/false
This works (up to a point) but I am caught by the final line in the
Help that says:
"This property's setting doesn't take effect until the next time the
database opens"
So, it would seem that I have to quit the database and get the user to
log in again. (But then, of course, not repeat this procedure!)
Is there any way in which this change can be made for the current user
without them having to log in again?
Or is it possible to quit and then (from code) automatically log that
user in again?

You can't just set a custom object property without first creating it.
Here's a module which will give you the ability to set, get and delete
object properties:

http://www.smccall.demon.co.uk/Objects.htm#ObjFuncs

Using that, all you need is:

SetObjProp CurrentDb, "AllowToolbarChanges", True

then, to verify it:

Debug.Print GetObjProp(CurrentDb, "AllowToolbarChanges", false)
Result: True

Notice that the line in help that you mentioned is *wrong*. As soon as you
either create or alter an object's properties, the changes are made
available. They will survive a database restart, though.

Also if you're going to refresh the properties collection (I've never found
it to be necessary), you're better off doing it before the assignment rather
than afterward.
Thanks Stuart but this still does not work for me. I still need to
close and open the database for it to take effect. It would seem that
the line in the Help in correct.

When AllowToolbarChanges is set to false (after a restart) the
Toolbars item in the View menu is not available. When I run your
code, this item remains visible until I restart the database. I want
it to take effect immediately
Jul 29 '08 #6
Thanks Stuart but this still does not work for me. I still need to
close and open the database for it to take effect. It would seem that
the line in the Help in correct.
When AllowToolbarChanges is set to false (after a restart) the
Toolbars item in the View menu is not available. When I run your
code, this item remains visible until I restart the database. I want
it to take effect immediately
Ah. Ok, try this:

CommandBars("Menu Bar").Controls("View").Controls("Toolbars").Visibl e =
False

(that should be all on one line)
Jul 29 '08 #7
On Jul 29, 4:02*pm, "Stuart McCall" <smcc...@myunrealbox.comwrote:
Thanks Stuart but this still does not work for me. *I still need to
close and open the database for it to take effect. *It would seem that
the line in the Help in correct.
When AllowToolbarChanges is set to false (after a restart) the
Toolbars item in the View menu is not available. *When I run your
code, this item remains visible until I restart the database. *I want
it to take effect immediately

Ah. Ok, try this:

CommandBars("Menu Bar").Controls("View").Controls("Toolbars").Visibl e =
False

(that should be all on one line)
That did the trick, thanks.

I was not sure of the syntax to do this.

Jim

Jul 29 '08 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Pato Secruza | last post by:
Hi everyone! I have a really frustrating error and need help. I’m trying to do a function that gets the properties and names of the fields in a MS Access database using ASP. I haven’t...
3
by: Daniel M | last post by:
I'm building a medium-scale data-entry web application, which involves creating data entry forms, record listings and detail screens for lots of database tables. Rather than designing a series...
7
by: vsiat | last post by:
I am trying to create a treeview out of a database table with the typical structure ID, NAME, PARENTID, TYPE, EXTRA_INFO, where is linked to the . What I want to achieve is create a tree made...
4
by: beatdream | last post by:
I am designing a database to handle different kinds of products ... and these products can have different properties...for example, a trouser can be specified by the width, length, color, and other...
1
by: | last post by:
Hi. This is a a semi-newbie question about how to store arbitrary information about my apps such that I can code quickly, mimizing complexity and the number of things I have to hold in my brain. I...
5
by: Tarscher | last post by:
Hi all, My application uses a database to store big blobs (0.5 - 1 Gb). I have a List of a class Sample that I store in a blob. Since the blob can become very big I want to use compression. ...
49
by: ARC | last post by:
Hello all, I have one chance to get this right, as I'm nearing a release of a program. I've looked at the database settings, and so far, have set the following: * Unchecked 'Enable design...
1
by: sunnyluthra1 | last post by:
Hi Everyone, I am working on a piece of code, that displays the properties(Name, Datatype, size & Description) of the table in the database. Now I want to further Enhance the code. I Have created...
1
by: AllBeagle | last post by:
Hello Everyone, I'm trying to build a web-based application for a client of mine and I keep finding holes in my design, so I could use some guidance if anyone has any to offer. Let me try to...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.