Cannnot split the database usling Database splitter wizard

F

Frank Situmorang

Hello,

I can not split the database with the following errorrmessage windows:
The database engine could not lock table "Switchboard Items" because it is
already in use by another persons or process

I appreciate your help
 
F

Frank Situmorang

Ok I found out the clue that we have to close all form, while we are going to
split it, so that it will not disturb the process
 
A

Allen Browne

Frank, have been watching as you developed this process over recent months.
Splitting the creating the final MDE front end are things that occur right
near the end of the process, so you look like you are nearly there.

I think you have the splitting issue solved, so that's done. It's just about
as easy to split manually anyway: just make a copy of the back end, and
delete all queries, forms, reports, and modules (using Shift+Delete so you
don't have to confirm each one), and there's the back end. For the front
end, I usually create a new (blank) database, turn off Name AutoCorrect, set
minimal references, link all tables from the back end, and then import the
queries, forms, reports, and modules from the original development db.

Before doing that, I usually compact, decompile, and compact the original
MDB, so I'm not importing any junk into the new front end. This kind of
sequence:
http://allenbrowne.com/recover.html

Once you have the new MDE front end, you want to set some properties so the
end users can't too easily get at things they should not. This kind of
thing:


Function StartupProps(bSet As Boolean)
Dim dbData As DAO.Database
Dim strDb As String

'Assumes the MDE file is in the same folder and has the same name as
this one.
strDb = DBEngine(0)(0).Name
If strDb Like "*.mdb" Then
strDb = Left$(strDb, Len(strDb) - 1) & "e"
Else
Debug.Print "NOT SET"
Exit Function
End If

'Open the database
Set dbData = OpenDatabase(strDb)

ChangeProperty dbData, "StartupShowDBWindow", dbBoolean, False
Call ChangeProperty(dbData, "AllowSpecialKeys", dbBoolean, bSet)
Call ChangeProperty(dbData, "AllowBypassKey", dbBoolean, bSet)

dbData.Close
Set dbData = Nothing
End Function

Function ChangeProperty(dbs As Database, strPropName As String, _
varPropType As Variant, varPropValue As Variant) As Integer
Dim prp As Property
Const conPropNotFoundError = 3270

On Error GoTo Change_Err
dbs.Properties(strPropName) = varPropValue
ChangeProperty = True
Debug.Print strPropName & " is " & varPropValue

Change_Bye:
Exit Function

Change_Err:
If Err = conPropNotFoundError Then 'Property not found.
Set prp = dbs.CreateProperty(strPropName, varPropType, varPropValue)
dbs.Properties.Append prp
Resume Next
Else 'Any other error.
ChangeProperty = False
Resume Change_Bye
End If
End Function
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top