PDA

View Full Version : Access: forcing a pop-up when db is opened


bigred
19th February 2008, 12:44 PM
I'm sure there's an easy answer that for some reason I've missed, but all I want is for a simple pop-up message to pop up every time the d.b. is opened - is there an easy way to do this? Been tinkering around with forms and googling to no avail so far. Thx

krelnik
19th February 2008, 01:34 PM
You'll have to be more specific about what you mean by "every time the d.b. is opened". What is "d.b."?

Professor Yaffle
19th February 2008, 01:37 PM
I can't help the OP, but I presume db means database.

bigred
19th February 2008, 01:37 PM
? "Database"

Don't overthink it. ;)

Rasmus
19th February 2008, 01:47 PM
? "Database"

Don't overthink it. ;)

I'm afraid you are underthinking it.

Which database?
Who is opening it how, from where?
Where should what kind of pop-up appear?

I doubt I could answer your questions, but I think you need to be much more precise.

nimzov
19th February 2008, 02:05 PM
I'm sure there's an easy answer that for some reason I've missed, but all I want is for a simple pop-up message to pop up every time the d.b. is opened - is there an easy way to do this? Been tinkering around with forms and googling to no avail so far. Thx
I am not sure how simple the answer is, but maybe you should have a look at triggers to solve your problem.

Triggers are activated by your database in response to certain operations (or events) on that database. Like adding or modifying a record .

Here is a starting point if you have no idea how triggers or stored procedures work:

http://databases.about.com/od/administration/a/triggers.htm

nimzo

bigred
19th February 2008, 02:49 PM
I'm afraid you are underthinking it.maybe, but I don't think so.

Which database?um the one I created.

Who is opening it how, from where?Who cares who's opening it? "How" is by doing that double-click thingy you do on files to open them. :cool: (accessing it from a shared drive)

Where should what kind of pop-up appear?Middle of the screen would be nice but I can figure that out and it should be a simple pop-up which has some informational text and you must click OK to proceed (I believe that's called "modal" in geek talk).

I doubt I could answer your questions,Thanks, that made answering all of your questions so worthwhile. :rolleyes:

;)


I am not sure how simple the answer is, but maybe you should have a look at triggers to solve your problem.

Triggers are activated by your database in response to certain operations (or events) on that database. Like adding or modifying a record .
Thanks, except I don't want this to pop up as a result of some action. I want it to automatically pop up as soon as the .mdb is opened...

I am amazed how futile a 'net search has been. Even after I blocked out words like "internet" or "IE," I still get mostly links that angle towards the that nasty kind of pop-up, not ones I create and actually want. :(

krelnik
19th February 2008, 02:58 PM
Thanks, except I don't want this to pop up as a result of some action. I want it to automatically pop up as soon as the .mdb is opened...


Finally, a clue! OK, so you are talking about Microsoft Access.

There are a number of different database programs. Each is created by a different vendor. Each works differently. Without telling us "I'm using Microsoft Access on a PC", we have no chance of helping you.

Solution:

If you control how the database is launched (for instance from a batch file or a shortcut), you can specify a macro to run on the command line:


msaccess.exe mydatabase.mdb /x mymacro


The macro is created and stored inside the .MDB. Write one that uses MessageBox to pop up a box with the appropriate message.

--Tim Farley

Rasmus
19th February 2008, 03:11 PM
maybe, but I don't think so.

Trust me ...

um the one I created.

That was real helpful. But at least later you are hinting that it is MS Access we're talking about.

Who cares who's opening it? "How" is by doing that double-click thingy you do on files to open them. :cool: (accessing it from a shared drive)

Well, it might be a Windows user, as seems to be the case here. Or a website visitor. Or a process. And probably at least 12 other things.

Middle of the screen would be nice but I can figure that out and it should be a simple pop-up which has some informational text and you must click OK to proceed (I believe that's called "modal" in geek talk).

I meant, do you want it to appear on the user's screen, or your own, or maybe the screen of the server, etc.

Thanks, that made answering all of your questions so worthwhile. :rolleyes:

;)

I am sure it was, actually.

Thanks, except I don't want this to pop up as a result of some action. I want it to automatically pop up as soon as the .mdb is opened...

It looks as if VBA would be a good bet. Now the next question is, should the window pop up on the iser's PC, yours, or whichever PC is sharing the drive the DB is on?


And the last question (for now): What should clicking "OK" accomplish? Do you want a possibility to grant or deny users to access the DB? Do you want a flash screen that just informs anyone what it was you who wrote the database? Or sometrhing else?

Professor Yaffle
20th February 2008, 03:53 AM
Did the word Access at the beginning of the title of this thread not clue anyone else in that the OP was talking about an Access database?;)

SezMe
20th February 2008, 05:14 AM
Solution:

If you control how the database is launched (for instance from a batch file or a shortcut), you can specify a macro to run on the command line:
It is even easier if you name the macro Autoexec. Then it will run automatically when the db is opened. And, as mentioned, you use the messagebox function.

BTW, if you take this approach and want to disable the autoexec macro, just hold down the shift key when you open the database and the autoexec macro won't run. Best of both worlds.

H3LL
20th February 2008, 05:27 AM
I missed the Access reference in the title and thought I had fallen into an Eddie Izzard sketch.


Ri8EOJBu5Fk


:D

bigred
20th February 2008, 07:49 AM
Finally, a clue! OK, so you are talking about Microsoft Access.

There are a number of different database programs. Each is created by a different vendor. Each works differently. Without telling us "I'm using Microsoft Access on a PC", we have no chance of helping you.I would have thought starting the thread title with the word "Access" would have sufficed ;) Anyway....this will be accessed by clicking directly on the database file itself, so can't use the switch/.bat file idea, but sezme's magical Autoexec naming did the trick - thx to both!


Did the word Access at the beginning of the title of this thread not clue anyone else in that the OP was talking about an Access database?;)lol - yeah I was starting to think "sh**, there must be a lot of other databases called Access I don't know about" ;)

Thx again all, appreciate the input!