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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I need help in understanding the difference between runtime 3

Status
Not open for further replies.

kat25

Technical User
Feb 26, 2003
105
US
Hi,
I have an application on Access 2000. At the time, my ofc mgr stated I could not use the runtime version of Access. Now I am being directed to deploy my application to a group of remote users as a runtime application. I'm not certain if the remote group is currently using runtime 2000 or 2002.
Can someone help me understand if my application can be ran on their runtime version.
Please let me know if I need to explain this further.
Thank you.
kat
 
Hi,
The meaning of a runtime is that an existing Access database can be run on a computer that doesn't have Access installed, similar to the Microsoft PowerPoint viewer.

It doesn't matter what version of Access or even which version of Access runtime is installed on the target computer because the runtime that you create is an independent application that installs your database as a program. Your application can not be run on any existing runtime.

hth


 
Thanks for the response. One more question. Can a remote user see my database tables if I do not have the database split? I only have the database as a mde. I do not have any access security on the mde.

Thanks.
 
If your database is an mde then you will not be able to split it. You need the original mdb do that. Should the original mdb not be available then try to export all the objects into a new mdb and then split that before creating the runtime.
You do not say if your database will be multi user or not. The created runtime will run locally on the target computer, should more users require to use the database then you will have to install the program centrally which could lead to a problem when the database was not set up for sharing initially.


 
I do still have the original mdb. Today, I have 3 users accessing my database over our company's network. All 3 users can access the db. at the same time.
I'm not certain if I've answered your question correctly...hope so.
 
Split your mdb into two databases using the database splitter. Put your table database onto the server. Ensure that your program database is correctly linked to the table database on the server. Create your runtime from your program database and distribute it to your users.
 
I understand what you're saying regarding splitting the database. I'm confused when you say...."create your runtime". How do I create the runtime? Do you mean identifying my program database name in the 'target' shortcut that will reside on each users pc?
I'm sorry I don't understand 'create' the runtime.
Thank you for your patience and help.
 
It doesn't matter what version of Access or even which version of Access runtime is installed on the target computer because the runtime that you create is an independent application that installs your database as a program. Your application can not be run on any existing runtime."

I don't understand this statement. I've got a number of databases (Access 97) running on computers with Runtime installed. All of them had Runtime installed for one database; the others run just fine, as long as Runtime has been installed previously.

I think you do need the correct version of Runtime for your database (whatever version you used in developing it).

If you have the Developer's Edition, you have the Set Up Wizard, which will create an installation program and include Runtime. You have to have the Developer's edition to have the license to distribute Runtime.


 
I have Access 2000 software loaded on my pc. When I open Access, my first screen states, "Create a new database using": (1) access database wizards, pages, project (2) blank access database or (3) open existing file.

I created my database using option 2 - blank access database.

I originally began this note to try and understand if I would have to do or change anything with my exsiting database to allow it to run as a runtime application.
I have some new users who already are using Access runtime with another person's database and I wanted to be able to take advantage of them having the exsiting runtime on their pcs.
I hate to be so un-educated about this. I really want to know if I have to make any modification to my database in order for my new users to run it in a runtime environment.
I appreciate the help.
 
The whole idea behind the runtime system is to allow developers to distribute their Access programs to third parties, without the need to ensure that the receiver of the program has Microsoft Access installed.

GDGarth is correct to say that you must use the right Developer with version of Access in which the database was compiled, in your case kat25, Microsoft Office Developer 2000 (MOD 2000). This is a separate program which needs to be bought. With it you can package your database in a setup routine and distribute it to your users. You do not need to change anything on the program apart from letting it compile and convert to an mde, so long as it's working ok. As I said earlier, if you're distributing for multi user, then you need to split the database. If you're not certain about how to use the runtime, go to Microsoft and search for MOD 2000. You should find instructions on how to obtain the developer and the Knowledge Base has information on how to go about packaging your database and distributing it.

GDGarth:
There is no limit to how many Access runtimes can be installed on one PC! The point is that each database has its own runtime! This is because each database can have different libraries and different connections to tables and/or files. Technically what happens is, as soon as a second runtime is installed, the registry is changed to accommodate the new program. A second runtime isn't actually installed. You can even deploy a runtime database on a computer that has Access installed. This is useful for developers who want to be certain that their program is properly installed in the right directory, with the right libraries etc.
 
Thanks GDGarth and AJN2004.
I really appreciate your prompt replies and assistance.

One last question, which is not regarding runtime.

I work Mon - Thurs and would like to be able to keep users from using the database on Fridays. Is there any code I could incorporate that would 'block' the users from gaining access to the database. This would also be helpful to me whenever I am doing maintenance on the database.

Again, thanks so much for all your help.

Kat25
 
Add the folowing code to the "On open" section in the properties dialog of your start form:

Code:
Private Sub Form_Open(Cancel As Integer)
If Weekday(Date) = 6 Then
    MsgBox "Sorry the database is down today for maintenance." _
        & "Please try again on Monday", vbOKOnly + vbInformation, "Database down"
        
    DoCmd.Quit
End If
End Sub

if the day is 6 (Friday) a messag box appears informing the user that he/she cannot use the databse and closes the program.
 
Thanks. I will give this a try. In the coding
"(Date) = 6..." do I type in the actual date in ( )?
Such as. If Weekday(05/14/04) = 6

Thanks. I am still new to vba coding.
 
Sorry I didn't read your message fully.

To your last question: No, WeekDay(date)=6 means a Friday.

if you want to keep your users out of the database when yor're working on it then you'll need to add a maintennace field to a table or add a table with one field, maintenenance. this field has 2 states; a) 0 = the database can be opened b) -1 = the database cannot be opened.

Add the following to your database:

Add a Button to one of your forms and name it Maintenance.
copy the following code into the vb editor:

Code:
Private Sub Form_Open(Cancel As Integer)
Dim Dba As DAO.Database, Rst As DAO.Recordset
Set Dba = CurrentDb

Set Rsb = Dba.OpenRecordset("Your maintenance table")

If Weekday(Date) = 6 Or Rst("Maintenance") = -1 Then
    MsgBox "Sorry the database is down today for maintenance." _
        & "Please try again on Monday", vbOKOnly + vbInformation, "Database down"
        
    DoCmd.Quit
End If
End Sub


Private Sub Maintenance_Click()
Dim Dba As DAO.Database, Rst As DAO.Recordset
Set Dba = CurrentDb

Set Rsb = Dba.OpenRecordset("Your maintenance table")

Select Case RstRst("Maintenance") ' checks the state of the field and alters it: -1=db down, 0= db open
    Case 0
        Rst.Edit
        Rst("Maintenance") = -1
        Rst.Update
    Case -1
        Rst.Edit
        Rst("Maintenance") = 0
        Rst.Update
End Select
        
Rst.Close
Set Dba = Nothing

End Sub

when you distribute your database, remember to remove the maintenance button. It's only for you!
 
Thanks,
I will give it a try.
Have a good day.
 
AJN2004
I am getting a coding error - Expected Expression
This is what I typed. The word "for" highlights in red.
If I try to add the message a different way, then the entire message highlights in red. Thanks.
****************************************************88

Private Sub Form_Open(Cancel As Integer)
If Weekday(Date) = 6 Then
MsgBox "Sorry the database is down today for maintenance." _
& "Please try again on Monday",
vbOKOnly vbInformation, "Database down"
DoCmd.quit
End If
End Sub
 
I also forgot to mention that whenever I type the + sign
between vbOKOnly and vbInformation, the system removes the + sign. That is why you don't see it in my above example.

Thanks.
 
In your example of the code the underscore (_) at the end of the 4th line is missing. The underscores tells the compiler that the code is actually in one line. Try copying the code out of the Forum.

I can't for the moment think why your system should remove the "+" sign. If after copying the code the "+" disapears then remove the word "vbInformation". It's not really necessary, just good coding practice.

By the way I forgot to mention that the first Code segment should only be included in the database that you distribute and not in yours, just in case you do have to work on a Friday!
 
When I copied/pasted from your note, it worked like a
charm.

Thank you kindly for all your help!

Kat25
 
First, let me say the title of this message does not match the question originally asked. The original message in May had several questions within the post. Now, on to my question/problem:

I was given this code back in May and it worked fine for me. I lost my database that I tested this event on and now I'm trying to rebuild the event on a new test database, but its not working for me now.

The only difference I am doing today is changing (date)=6 to
(date)=3. Assuming '3' is for Wednesday - so I can test it today.

Here is the help I received from AJN2004. I know the code works, but for some reason I can't get it to work for me today. This is a copy of the message from May.
**********************************************
Add the folowing code to the "On open" section in the properties dialog of your start form:


CODE
Private Sub Form_Open(Cancel As Integer)
If Weekday(Date) = 6 Then
MsgBox "Sorry the database is down today for maintenance." _
& "Please try again on Monday", vbOKOnly + vbInformation, "Database down"

DoCmd.Quit
End If
End Sub

if the day is 6 (Friday) a messag box appears informing the user that he/she cannot use the databse and closes the program.
*******************************************************

I open the properties box on my startup form and added the code to the "On Open" event for the form.

Does anyone having any ideas as to what I'm doing wrong?
Much thanks.
Kat
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top