M
makyland
Hi!
I've just added user-level security to my database application (Access 2003)
and notice that I have a problem with changes not being saved in certain
form. I have allow every permission to admin user and open the database in
every possible mode (joining the usergroup, calling the usergroup with VB
with a shell instruction... -it's not the first time I do this type of
access-). I've learnt that the only way to get changes in my form to be
correctly saved and properly shown (when needed) is MANUALLY OPENING THE
DATABASE IN EXCLUSIVE MODE (when I set open exclusively from Tools_Options
doesn't seem to really open it exclusively... --> in this way I'm not allowed
to make changes in code because it says I don't have exclusive access to the
database).
On one hand, this is not the first project where I use user-level security
and where forms suffer some changes in design view that need to be saved and
properly displayed when needed and I never had the need to open exclusively
the database. In the other projects this was not a problem... (examples of
changes in forms: changing the caption of labels, changing the sourceobject
of a subform to display a different form in pivotchart view...)
No need to say that I have try all the possible combinations to grant myself
every possible permission, but only manually opening the database exclusively
worked.
Leaving apart the idea of understanding why I never had any problem with
that in other projects and I have it now (if someone could help on this it
would be truly appreciated!!!!!), does anyone happen to know how could I use
open the database in exclusive mode using Shell? (I'm not using
"opendatabase" but this instead:
strAccDir = My.Computer.FileSystem.SpecialDirectories.ProgramFiles &
"\Microsoft Office\OFFICE11\"
strAccPath = strAccDir & "MSACCESS.EXE"
strPath = Chr(34) & strAccPath & Chr(34) & " " & Chr(34) &
"C:\happy2diet\mydatabase.mdb" & Chr(34) & " " & "/wrkgrp " & Chr(34) &
"C:\happy2diet\mydatabase.mdw" & Chr(34) & " " & "/User " & Chr(34) &
Me.txtUserName.Text & Chr(34) & " " & "/Pwd " & Chr(34) & Me.txtPassword.Text
& Chr(34)
Shell(strPath, vbMaximizedFocus)
(you can guess me.txtusername and me.txtpassword are textboxes into a .NET
form)
Is there any modifier to force the database to be opened in exclusive mode????
Thank you in advance for your help and support!!!!!
Best regards,
I've just added user-level security to my database application (Access 2003)
and notice that I have a problem with changes not being saved in certain
form. I have allow every permission to admin user and open the database in
every possible mode (joining the usergroup, calling the usergroup with VB
with a shell instruction... -it's not the first time I do this type of
access-). I've learnt that the only way to get changes in my form to be
correctly saved and properly shown (when needed) is MANUALLY OPENING THE
DATABASE IN EXCLUSIVE MODE (when I set open exclusively from Tools_Options
doesn't seem to really open it exclusively... --> in this way I'm not allowed
to make changes in code because it says I don't have exclusive access to the
database).
On one hand, this is not the first project where I use user-level security
and where forms suffer some changes in design view that need to be saved and
properly displayed when needed and I never had the need to open exclusively
the database. In the other projects this was not a problem... (examples of
changes in forms: changing the caption of labels, changing the sourceobject
of a subform to display a different form in pivotchart view...)
No need to say that I have try all the possible combinations to grant myself
every possible permission, but only manually opening the database exclusively
worked.
Leaving apart the idea of understanding why I never had any problem with
that in other projects and I have it now (if someone could help on this it
would be truly appreciated!!!!!), does anyone happen to know how could I use
open the database in exclusive mode using Shell? (I'm not using
"opendatabase" but this instead:
strAccDir = My.Computer.FileSystem.SpecialDirectories.ProgramFiles &
"\Microsoft Office\OFFICE11\"
strAccPath = strAccDir & "MSACCESS.EXE"
strPath = Chr(34) & strAccPath & Chr(34) & " " & Chr(34) &
"C:\happy2diet\mydatabase.mdb" & Chr(34) & " " & "/wrkgrp " & Chr(34) &
"C:\happy2diet\mydatabase.mdw" & Chr(34) & " " & "/User " & Chr(34) &
Me.txtUserName.Text & Chr(34) & " " & "/Pwd " & Chr(34) & Me.txtPassword.Text
& Chr(34)
Shell(strPath, vbMaximizedFocus)
(you can guess me.txtusername and me.txtpassword are textboxes into a .NET
form)
Is there any modifier to force the database to be opened in exclusive mode????
Thank you in advance for your help and support!!!!!
Best regards,