Making an access app into VB app

mrssevans

Registered User.
Local time
Today, 20:23
Joined
Nov 15, 2001
Messages
190
Is there a way to take a access application and put it in VB and make it a free standing program? In other words, cut ms access out of the picture so that the program could be run without office? Any help is welcome.
 
In a short answer, NO.

There are, however a couple of things you can do to make it sort of look like Access is not present.

First, you can buy the Developer's Edition of Access so you can distribute RUNTIME versions of Access. What this will do will allow users who do not own a full version of Access to use a special version (hence RunTime) of Access that you will supply them along with other required files for your application by using the Packaging and Deployment feature that comes with the Dev Edition. Your application will need to be INSTALLED on each computer that uses it, AND you'll need to make sure that EVERY file that could cause a MISSING Reference is accounted for, and the version you are using is installed so that they don't have something that is out of date or missing.

Second, you can use Visual Basic to create a stand alone application which will utilize the Access Jet Engine and will require the Access .mdb file to function. You can then access the data inside the .mdb file via VB forms and ADO, etc. However, that will not stop someone from opening and altering the .mdb file. This will require you to package and deploy as well, and will require you to have Visual Basic yourself.

In each of the above scenarios, you will need to create things and have extremely bug-free error trapping to be able to have the application work properly because there are things that come with Access that aren't included in the RunTime version or if you use VB to create a program to interface with an Access .mdb file.

Good Luck!

BL
hth
 
Is it possible to let the main access screen disappear or hide, so that you only see the forms of the database, no tables, or links to tabledesign formdesign etc..

What I mean is that I don't want the complete access interface 'around' the dbase.. but only the dbase itself on screen with access running on the background...
 
Ironis said:
Is it possible to let the main access screen disappear or hide, so that you only see the forms of the database, no tables, or links to tabledesign formdesign etc..

What I mean is that I don't want the complete access interface 'around' the dbase.. but only the dbase itself on screen with access running on the background...

Yes, you can do that using the 'Switchboard' in concert with a custom 'Command Bar' and some startup options.
You can keep most users out of your Tables and other goodies.

However all of this can be bypassed with the 'SHIFT' Key
 
Disable (Shift) Bypass Key

The below function and command button code will allow you to use a password
protected input box to determine if the Shift key can be disabled or not.

You might have to set your "References" to DAO 3.6. When you are viewing
the module, click the Tools menu >>> References >>> and Browse for Microsoft
DAO 3.6 >>> Select "Files of type: Executable Files (*.exe; *.dll)"
My DLL was located @ C:\Program Files\Common Files\Microsoft Shared\DAO.
Copy this function into a new public module.
Code:
Public Function SetProperties(strPropName As String, varPropType As Variant, varPropValue As Variant) As Integer
On Error GoTo Err_SetProperties
    
    'Dim db As Database, prp As Property
    Dim db As DAO.Database, prp As DAO.Property
    
    Set db = CurrentDb
    db.Properties(strPropName) = varPropValue
    SetProperties = True
    Set db = Nothing
    
Exit_SetProperties:
    Exit Function
    
Err_SetProperties:
    If Err = 3270 Then 'Property not found
        Set prp = db.CreateProperty(strPropName, varPropType, varPropValue)
        db.Properties.Append prp
        Resume Next
    Else
        SetProperties = False
        MsgBox "Runtime Error # " & Err.Number & vbCrLf & vbLf & Err.Description
        Resume Exit_SetProperties
    End If
    
End Function
Assign this to the OnClick event of a command (transparent?) button named "bDisableBypassKey".
Change the "TypeYourBypassPasswordHere" default password.
This sub ensures the user is the programmer needing to disable the Bypass Key.
You can not format an Input Box!
Code:
Private Sub bDisableBypassKey_Click()
On Error GoTo Err_bDisableBypassKey_Click
    
    Dim strInput As String
    Dim strMsg As String
    
    Beep
    strMsg = "Do you want to enable the Bypass Key?" & vbCrLf & vbLf & "Please key the programmer's password to enable the Bypass Key."
    strInput = InputBox(Prompt:=strMsg, Title:="Disable Bypass Key Password")
    
    If strInput = "TypeYourPasswordHere" Then
        SetProperties "AllowBypassKey", dbBoolean, True
        Beep
        MsgBox "The Bypass Key has been enabled." & vbCrLf & vbLf & "The Shift key will allow the users to bypass the startup options the next time the database is opened.", vbInformation, "Set Startup Properties"
    Else
        Beep
        SetProperties "AllowBypassKey", dbBoolean, False
        MsgBox "Incorrect ''AllowBypassKey'' Password!" & vbCrLf & vbLf & "The Bypass Key was disabled." & vbCrLf & vbLf & "The Shift key will NOT allow the users to bypass the startup options the next time the database is opened.", vbCritical, "Invalid Password"
        Exit Sub
    End If
    
Exit_bDisableBypassKey_Click:
    Exit Sub
    
Err_bDisableBypassKey_Click:
    MsgBox "Runtime Error # " & Err.Number & vbCrLf & vbLf & Err.Description
    Resume Exit_bDisableBypassKey_Click
    
End Sub
HTH
 
Last edited:
Re: Disable (Shift) Bypass Key

ghudson said:
'The below function and command button code will allow you to use a password protected input box to determine if the Shift key can be disabled or not.

Nice! :D

I will put that in my Bag 'o' Tricks
 

Users who are viewing this thread

Back
Top Bottom