473,539 Members | 5,737 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Warning Window

69 New Member
Using Access '97

Hi there, am wondering if there is a way to have one window come up with all the controls that are missing an entry instead of having several pop up. In other words, if I am missing data entry in 5 controls, is there a way to have one list of all 5 controls appear in 1 window instead of getting 5 different warning windows popping up?

Thank you VERY MUCH for your assistance.
Aug 27 '07 #1
1 1506
ADezii
8,834 Recognized Expert Expert
Using Access '97

Hi there, am wondering if there is a way to have one window come up with all the controls that are missing an entry instead of having several pop up. In other words, if I am missing data entry in 5 controls, is there a way to have one list of all 5 controls appear in 1 window instead of getting 5 different warning windows popping up?

Thank you VERY MUCH for your assistance.
In the BeforeUpdate() Event Procedure of your Form, you can do something like the following:
Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_BeforeUpdate(Cancel As Integer)
  2. On Error Resume Next
  3.  
  4. Dim ctl As Control, strNulls As String, blnCancelUpdate As Boolean
  5.  
  6. blnCancelUpdate = False
  7.  
  8. For Each ctl In Me.Controls
  9.   If ctl.ControlType = acTextBox And ctl.ControlType <> acLabel Then
  10.     If IsNull(ctl.Value) Then
  11.       strNulls = strNulls & ctl.Name & vbCrLf
  12.       blnCancelUpdate = True
  13.     End If
  14.   End If
  15. Next
  16.  
  17. If blnCancelUpdate Then
  18.   MsgBox "Text Box(es) missing values: " & vbCrLf & vbCrLf & strNulls, vbExclamation, "Missing Data"
  19.   Cancel = True
  20. Else
  21.   'do nothing - Update
  22. End If
  23. End Sub
Aug 28 '07 #2

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

Similar topics

2
8625
by: Steve | last post by:
I'm working in PHP, but am also using JavaScript, so perhaps there is a better way to do this using more PHP code...... I setup a search screen for my database, the user enters data and submits a form via POST From that I get a results list screen, based on data I submit via a form from the search screen In the results list screen, I...
0
2627
by: Carl Owenby | last post by:
Re: Microsoft Knowledge Base Article - 174942 "File Modified Outside Source Editor" Warning Message I believe I have discovered a cause of this warning in a specific situation. I encountered this message while using Microsoft Visual C++ .NET. The message box appears after the "Build Solution" command is complete, following editing of...
4
17825
by: mimmo | last post by:
Hi! I should convert the accented letters of a string in the correspondent letters not accented. But when I compile with -Wall it give me: warning: multi-character character constant Do the problem is the charset? How I can avoid this warning? But the worst thing isn't the warning, but that the program doesn't work! The program execute...
3
2544
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 libs; use /NODEFAULTLIB:library Here is the compiler options: /Od /I "C:\DriverX4\Include" /I "..\ThreadLib" /AI "..\Utility\bin\Debug" /AI...
8
4509
by: Harry Simpson | last post by:
Got a web app that keeps the 20 sec session timeout default. Only deal is the user doesn't know the session timed out till they submit the page. On one page that i actually don't care if it times out i have a meta tag that refreshes at about 18 minutes so the screen never times out. On the other pages that i want to time out, i'd like to...
4
10090
by: Rich Wallace | last post by:
Is there a way to open an Excel file and either respond to or supress the Macro warning window via VB.NET? Dim oExcel As Excel.Workbook Dim sFilePath As String = "C:\DailyReport.xls" oExcel = GetObject(sFilePath) --> Throws Macro warning window oExcel.Unprotect("password")
6
5751
by: Tom McL. | last post by:
I'm trying to move a program that was designed using Visual Studio 2003 and (Visual Basic) into Visual Studio 2005. When it runs I get the following warning in the Error List Window and I'm not sure how to correct it. The program runs fine except for the warning. The warning puts a green squiggle line under MyRecord in the (Private Sub...
1
3260
by: Cindy H | last post by:
Hi I used the code below to automatically open a pdf file when the user clicks on a menu option. It works great on local machine, but when I uploaded it to hosting site and then tried it, I get a 'File download-security warning' window popping up that ask if I want to download or open the file. It wants to download the aspx page itself ,...
5
3420
by: David | last post by:
Hi all, I am trying to overload the < operator, but get warning class Windowinfo { protected: HWND wndhandle; //the window handle int wndId; //the window Id
5
11217
by: LVenkatrao | last post by:
i tried to close the jsp page using window.close()/self.close() it is giving warning window how to close the browser page with out warning window
0
7368
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7311
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7538
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7655
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5835
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5228
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
4864
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
1
1774
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
934
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.