Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Troubles accessing to the VBE and the DB Window

Status
Not open for further replies.

Bresart

Programmer
Feb 14, 2007
314
ES
Hi, i have a DB set for when opening a form appears that hides any toolbar and menu bar, and the DB window, and keeps all that for the next opening, included the disabling of Shift key on opening.

This form has an sleep event, but i have removed the .dll reference and now i haven't possibility of accessing to the second form that has the unblocking button, nor to the VB editor for undoing the dll removing.

Is there any possibility of doing any of these two things?

Thanks for any help given.
 
Re-enable the Shift key by running this code from another database:

Code:
Function shiftKey(strDBName As String) As Boolean


Dim DB As Database
Dim prop As Property
Const conPropNotFound = 3270

Set DB = DBEngine.Workspaces(0).OpenDatabase(strDBName)

If DB.Properties("AllowByPassKey") = False Then
    DB.Properties("AllowByPassKey") = True
    shiftKey = True
Else
    DB.Properties("AllowByPassKey") = False
    shiftKey = False
End If



exit_shiftKey:
    Exit Function
    
err_shiftKey:
    If Err = conPropNotFound Then
        Set prop = DB.CreateProperty("AllowByPassKey", dbBoolean, False)
        DB.Properties.Append prop
        Resume Next
    Else
        MsgBox "Error " & Err.Number & " : " & Err.Description
        GoTo exit_shiftKey
    End If
End Function

Ed Metcalfe.

Please do not feed the trolls.....
 
Thanks Ed2020.

It gives the error "The user defined type hasn't be defined".

Which reference is needed to fix that error?
 
I have solved that Ed2020.

Now, there's the error The file couldn't be found.

It's in the same folder than the DB from i am running the code.
 
What value are you passing to the strDBName argument?

Ed Metcalfe.

Please do not feed the trolls.....
 
Ed2020, i have tried with the whole path and it works.

Once solved, is there any way of preventing this enabling of the Shift key from another DB? It would be interesting for blocking a DB with security purpose.

Thanks.
 
Yes, you need to apply user-level security to the database. Off the top of my head I'm not sure which permission you would need to remove from user accounts but at a guess it's Administration rights on the database object.

Ed Metcalfe.

Please do not feed the trolls.....
 
Bresart, you have to know that any power user may break any access security scheme in less than 10 minutes ...
 
Thanks Ed2020 PHV.

Does Visual Basic.Net offer the possibility of security guarantee?
 
Bresart said:
Does Visual Basic.Net offer the possibility of security guarantee?

It depends what you're doing with it, but in terms of reverse engineering an executable and getting at the source code the answer is no. Executables created in .Net languages are compiled to MS Intermediate Language and are actually very easy to reverse engineer.

It would offer greater security than MS Access if used as a frontend to a database.

Ed Metcalfe.

Please do not feed the trolls.....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top