MsgBox Shows first time opening only

musclecarlover07

Registered User.
Local time
Today, 14:02
Joined
May 4, 2012
Messages
236
Is there a way to get a msgbox to show only when the db is open for the first time. So basically what I want is when I push an update it will auto check to see if the db is current if not then it closes an opens the new db. When it opens the new db i want it to display a msg box or form that shows the new updates. Then if they exit an reopen it wont show the option.
 
You could have a table of Update History, that has a Check Box, that you could test when the DB is opened, if it is Unchecked then you show the message and in the same procedure check the check box so the message is not show again.
 
So the user would have to check the box themselves?
 
I have something set up like this also for users to be alerted when there is a new version. It's not a msgbox though - it's a dialog form that opens when new version is detected. It will continue to open until user checks the box. Message says "A new version is available. Please exit and update your program." Underneath that is a checkbox: "I have updated my program" they check it and it does just what John says - marks a flag in the table.

You can also get more in depth with this feature - I have a local table and a linked table for users and versions. If the local table has the wrong version for that user the system will alert them.
 
I prefer not to leave it to the user. I create a utility that checks the version on the server against the version on the client and copies the new version down when appropriate, then starts the client copy. I originally created that as an Access file, but switched it to an exe created in VB6 years ago. When the user starts my program, they are actually starting the utility, which then starts the program.

To your question, you can update the table yourself in code. Check a front end table, throw up your message box if the setting isn't appropriate, and update the setting (recordset or SQL).
 
Ok if there is a new version it will automatically close out an update it. I know it does use a .bat file. That works great. I just would like the people to see the recent changes. I have a button that takes them to that but I know they dont check that. I feel if it pops up they may read an see the changes then i wouldnt have to explain to each person. Im still learning all this. I have learned quite a bit an want to learn so much more. I dont like it when people give me the complete answer. I just need something to work off. example give me the code explain what the code does. I then can manuiplate it or plug in my info an all. I learn more that way. I have code an Im non 100% what they do but know it works. Like i stated It autocheck an autoupdates that worksits just showing the updates when its open for the first time.
 
Musclecarlover07,

I posted a similar question not too long ago and had a lot of help from Mr. Boblarson:

http://www.access-programmers.co.uk/forums/showthread.php?t=235939

There are two main parts:

Part One
The auto update that I use is located at:
http://www.btabdevelopment.com/ts/freetools

The first link will (see my link.png) will walk you through setting up the front end, backend, and mde file. For this to work, the user must have access to the backend (shared on a network drive). Read the directions 2, 3, or 5 times to be sure you completely understand how it works, or it will not work, period.

If you have question, just ask.

Part Two
The database I attached (SampleShowForOnce.mdb) will work in both 2003 and 2010. Basically after you split the database, create the mde or accde file, the profile for the update will be saved on the users machine. Here you will create a custom message saved in the table. After you make updates to the front end, you will delete the mde or accde shared file, and create a new one on the network folder. When the user double clicks the icon, it will display a message saying the database needs to update. It will delete the desktop copy, re-copy the network file, and open the database to your Update message.

Poke around in the database, see how it works, and apply it (if you want) into your database!

Best regards,
 

Attachments

  • SampleShowFormOnce.mdb
    SampleShowFormOnce.mdb
    420 KB · Views: 98
  • link.PNG
    link.PNG
    34.6 KB · Views: 146
I got the first part. He also gave that to me an that has helped out tremedously. I had an idea where I would take the code that has a pop up an says it will exit an update with the new data and replace that with my form i created an then have a button on the form that would then execute the code after the msgbox in his code. I don't know if this will work.

Also I was looking at the code you had in the close button for the frmShowOnce, you had Me.Dirty, what exactly does this mean/do in simple terms. Also I just see you jad Me.chkDoNotShow, but you didn't specify if it was checked or not it is defaulted to say if not checked? So then if I did a second update after this iI would go in to the table an uncheck then when I release the second copy it will show till checked? If this is the case I like this 10 times better then my idea above.
 
have a button on the form that would then execute the code after the msgbox in his code. I don't know if this will work.

i am 99% sure this wont work. as soon as you create the new .mde or .accde file on the server, and when the user opens their desktop version, it will automatically begin the delete and download process.

close button for the frmShowOnce, you had Me.Dirty, what exactly does this mean/do in simple terms

Code:
[COLOR=seagreen]If Me.Dirty Then Me.Dirty = False[/COLOR]
Basically it saves the form if you check chkDoNotShow

when you update the front end, go to the table [tsysShowForm], uncheck the box, type which ever update message, save, and close.
*this table is imported not linked

update the table on the FE [tbl-fe_version] to 1.4 (or whatever version you are on]
*just make sure this table is imported, not linked

update the table on the BE [tbl-version_fe_master] to 1.4 (or whatever version you are on, just make sure it is the same as the FE)
*this table is linked

just in case: FE = Front End, BE = Back End
 
Awesome that worked perfect. Thank you. Now I can add that knowledge for future refrence an now if I have any further important messasges I have the toold to work with that. GREATLY APPRECIATED.
 

Users who are viewing this thread

Back
Top Bottom