473,397 Members | 2,099 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

How do I creeat a pop up warning?

Access 2002

I'm wondering if anybody could help me figure out how to add a warning to an access database.

Here's my issue:
I have 2 databases that users will enter into, one is for 2006 data and the other is for 2007 data. What I would like to happen is for when the users open the 2006 datbase a warning pops up before the main menu that states "Please note that you are in 2006 database". After clicking the ok button it will bring them to the main menu form.

I have already changed the titles and colors to reflect the new year, but I would like to have one more fail safe so that they have to click the warning off to get into the old database.

Thank you in advance for your help!

-illusionone
Jan 10 '07 #1
2 3206
Put this code where your opening the form:

Expand|Select|Wrap|Line Numbers
  1.     Dim intMsg As Integer
  2.     intMsg = MsgBox("Please note that you are in 2006 Database." & _
  3.         " Do you want to continue?", vbQuestion + vbYesNo + vbDefaultButton2, "Please confirm")
  4.  
  5.     If intMsg = vbYes Then
  6.         'Open your form here
  7.     Else
  8.         'its up to you
  9.     End If
HTH,
George



Access 2002

I'm wondering if anybody could help me figure out how to add a warning to an access database.

Here's my issue:
I have 2 databases that users will enter into, one is for 2006 data and the other is for 2007 data. What I would like to happen is for when the users open the 2006 datbase a warning pops up before the main menu that states "Please note that you are in 2006 database". After clicking the ok button it will bring them to the main menu form.

I have already changed the titles and colors to reflect the new year, but I would like to have one more fail safe so that they have to click the warning off to get into the old database.

Thank you in advance for your help!

-illusionone
Jan 11 '07 #2
NeoPa
32,556 Expert Mod 16PB
George's code (or something along similar lines doctored for your exact situation) would be within the OnOpen event of the main form you refer to.
Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_Open(Cancel As Integer)
  2. '...George's code in here
  3. End Sub
Jan 12 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Bas Wassink | last post by:
Hello there, I'm having trouble understanding a warning produced by 'splint', a code-checker. The warning produced is: keywords.c: (in function keyw_get_string) keywords.c:60:31: Released...
3
by: Bill Burris | last post by:
How do I find what is causing this warning from the Linker? If I use /NODEFAULTLIB I get hundreds of undefined symbols. LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other...
3
by: DJTN | last post by:
I'm getting the following error when I try to compile my setup project in VS 2002. I have re-installed the .net framework 1.1 and it didnt solve the problem. WARNING: Unable to find dependency...
1
by: spanov | last post by:
i've got problem installing python-2.3.5 from sources on FreeBSD 5.3 root@server# ./configure > conf_log configure: WARNING: curses.h: present but cannot be compiled configure: WARNING:...
0
by: Manish | last post by:
PHP INI File Setting ------------------------------------------------------------------------------------------------------------------ error_reporting = E_ALL & ~E_NOTICE No warning message are...
5
by: Peter Ritchie [C# MVP] | last post by:
I've purposely been ignoring a CA2122 warning in some C++ interop code I've been working on for quite some time. I've just recently had the cycles to investigate the warning. The warning message...
1
by: Ian | last post by:
I've just discovered the msclr::lock class in the C++ Support Library online documentation. This seems like a much cleaner way to implement thread protection than using...
92
by: Heinrich Pumpernickel | last post by:
what does this warning mean ? #include <stdio.h> int main() { long l = 100; printf("l is %li\n", l * 10L);
4
by: cody | last post by:
It is possible to declare and use/instantiate a class with a uninitialized readonly field without even a compiler warning. Why don't I get warnings? public class Stuff { public readonly int a;...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.