need help on command buttons

~marie~

Registered User.
Local time
Today, 10:53
Joined
Jan 23, 2006
Messages
11
I want to create a new database which has a startup form that has 4 command buttons.. My problem is that I want that every click of the command buttons will take me to the main switchboard of the other/different database.. How am I going to link those buttons to different databases?:confused:

anyone help me?:(
 
I looked up opendatabase in vba help, drew a blank, but opencurrentdatabase came up with


' Include the following in Declarations section of module.
Dim appAccess As Access.Application

Sub DisplayForm()
' Initialize string to database path.
Const strConPathToSamples = "C:\Program " _
& "Files\Microsoft Office\Office\Samples\"

strDB = strConPathToSamples & "Northwind.mdb"
' Create new instance of Microsoft Access.
Set appAccess = _
CreateObject("Access.Application")
' Open database in Microsoft Access window.
appAccess.OpenCurrentDatabase strConPathToSamples
' Open Orders form.
appAccess.DoCmd.OpenForm "Orders"
End Sub

Im am sure you could change the Db path to siut your App.


Dave

.
 
thanks, i'll try dave..:)
 

Users who are viewing this thread

Back
Top Bottom