Open New Database in Existing Database

G

Guest

I have a database that is set up for reports only. In addition to this the database (.mde) is also being used to manually enter data. When making an .mde file from my .mdb to promote change/or new reports, I was loosing the data as they would be replaced. I have made a database for data entry in addition to the database for running reports. I now want a button in the main database that will link me over to this other database and back. I have had a user w/in my company give me what he uses however it is not working for me

Below is what he is using. I get an error when it looks for my file after changing the path. Any help would be greatly appreciated. We do have some runtime versions being run however that code can be eliminated as there are only a couple of these users and they will not be using this database


On Error GoTo Err_btnDemandPlanning_Clic

Dim stAppName As Strin
Dim stTestVal As Intege
Dim Qte: Qte = Chr(34

'Check system to see if Runtime or Full Version of Access installed - Runtime = -

stTestVal = SysCmd(acSysCmdRuntime

If stTestVal = -1 The
stAppName = Qte & "C:\Program Files\Microsoft Office\Office\MSACCESS.EXE" & Qte &
" /runtime " & Qte & "\\lexfile1\supplychain\Flightdeck\Forecasting_Module\Forecast.mde" & Qt
Els
stAppName = "msaccess.exe \\lexfile1\supplychain\Flightdeck\Forecasting_Module\Forecast.mde
End I

Call Shell(stAppName, 1

Exit_btnDemandPlanning_Click
Exit Su

Err_btnDemandPlanning_Click
MsgBox Err.Descriptio
Resume Exit_btnDemandPlanning_Clic
 
L

Larry Linson

I have a database that is set up for
reports only. In addition to this the
database (.mde) is also being used
to manually enter data.

I'm sorry, I don't understand. If it is "for reports only", it seems that it
would not "In addition to this the database is also being used to manually
enter data." Perhaps you could clarify?
When making an .mde file from my
.mdb to promote change/or new reports,
I was loosing the data as they would be
replaced.

That is easy to fix... you split the database into a back-end (tables with
data and relationships) and a front-end (queries, forms, reports, macros,
modules, and perhaps some local look-up tables). Normally changes are to the
front-end, which can be replaced without disturbing the backend where the
data resides.

I'm not at all certain why the approach you adopted solved the problem of
losing data. Perhaps there's some vital fact I did not see, or that is not
here.

Given that we don't have details of your application(s), nor a description
of the error ("an error" is not very helpful). Finally, if anyone has the
time/energy to debug, and you provide the other details, they would need the
code that is failing, not the code from which it is derived.

Larry Linson
Microsoft Access MVP



I have made a database for data entry in addition to the database for
running reports. I now want a button in the main database that will link me
over to this other database and back. I have had a user w/in my company
give me what he uses however it is not working for me.
Below is what he is using. I get an error when it looks for my file after
changing the path. Any help would be greatly appreciated. We do have some
runtime versions being run however that code can be eliminated as there are
only a couple of these users and they will not be using this database.
On Error GoTo Err_btnDemandPlanning_Click

Dim stAppName As String
Dim stTestVal As Integer
Dim Qte: Qte = Chr(34)

'Check system to see if Runtime or Full Version of Access installed - Runtime = -1

stTestVal = SysCmd(acSysCmdRuntime)

If stTestVal = -1 Then
stAppName = Qte & "C:\Program Files\Microsoft
Office\Office\MSACCESS.EXE" & Qte & _
" /runtime " & Qte &
"\\lexfile1\supplychain\Flightdeck\Forecasting_Module\Forecast.mde" & Qte
 

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

Similar Threads


Top