473,396 Members | 1,693 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,396 software developers and data experts.

Error not showing up

I hope This isnt to simple for this group but....

I am new to access and just finished a product. I added this code

Private Sub Form_BeforeUpdate(Cancel As Integer)
Dim strMsg As String
strMsg = "Data has changed."
strMsg = strMsg & "@Do you wish to save the changes?"
strMsg = strMsg & "@Click Yes to Save or No to Discard changes."
If MsgBox(strMsg, vbQuestion + vbYesNo, "Save Record?") = vbYes
Then
'do nothing
Else
DoCmd.RunCommand acCmdUndo

on to my form to tell the users they were actually adding data. The
problem is, there are a few mandatory field in the table. If a user
dosent fill in these fields and closes the form, they dont get an
error that there is mandatory data missing, and the other information
is not saved. Is there something Im missing? is there a way to check
if the info is all there before I run this code?

Any help id greatly appricated.

Mike
Nov 12 '05 #1
1 1654
SB
civimike wrote:
I hope This isnt to simple for this group but....

I am new to access and just finished a product. I added this code

Private Sub Form_BeforeUpdate(Cancel As Integer)
Dim strMsg As String
strMsg = "Data has changed."
strMsg = strMsg & "@Do you wish to save the changes?"
strMsg = strMsg & "@Click Yes to Save or No to Discard changes."
If MsgBox(strMsg, vbQuestion + vbYesNo, "Save Record?") = vbYes
Then
'do nothing
Else
DoCmd.RunCommand acCmdUndo

on to my form to tell the users they were actually adding data. The
problem is, there are a few mandatory field in the table. If a user
dosent fill in these fields and closes the form, they dont get an
error that there is mandatory data missing, and the other information
is not saved. Is there something Im missing? is there a way to check
if the info is all there before I run this code?

Any help id greatly appricated.

Mike

...........

im not new to access but i havent used it in many years m8,

would i be right im saying that there is a option in the General design
of the table for required yes/no ? group? sorry if im wrong!

Nov 12 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: db2group88 | last post by:
hi, we install db2 udb v8.1 on windows 64bit, in our application, we have sql execute "create table .... not logged initially", but from the operating system event viewer showing error stating that...
1
by: Sameer Sheikh | last post by:
Hi, I used to have this error come up everytime I tried to build(Ctrl+Shift+B) my ASP.NET app: (ERROR#1) Compiler Error Message: BC31011: Unable to load referenced library...
8
by: pmud | last post by:
Hi, I am using a compare validator in asp.net application(c# code). This Custom validator is used for comparing a value enterd by the user against the primary key in the SQL database. IF the...
8
by: Kevin Murphy | last post by:
Using PG 7.4.3 on Mac OS X 10.2.8, the following "insert into ... select ..." statement completed and then announced a syntax error, which seems bizarre. (Don't be confused by the fact that the...
1
by: GCeaser | last post by:
So here is the desired functionality: When an error occurs anywhere in my application, I want an error section on the page to display the error information while still showing the actual page...
29
by: =?Utf-8?B?SGVybWF3aWg=?= | last post by:
Hello, Please anybody help me. I have only a little experience with web development. I created simple project using ASP NET 2.0 (VS 2005) It works fine on local computer. When I tried to run...
0
by: imranabdulaziz | last post by:
Dear All, I am making web application using Asp.net C#(Visual Studio2005). And Sql server 2005 as a back End I generated local mode report but as there was no printing option available . I assign...
4
by: lalith369100 | last post by:
Iam almost completed my project Now iam integrating paypal pro But While running sample programs it was showing error Message like this Error Number: 56 Error Message: Received error code 404...
10
by: gary0gilbert | last post by:
An unusual spin to this recurring disk or network error in a Terminal Server environment. Access 2000, Terminal Server 2000, file server is windows 2000. All users have a separate copy of the...
1
by: nRk | last post by:
Hi, I am working on asp.net 2.0 with Visual Studio 2005. My asp.net project contains one Masterpage. I exposed my asp.net project in my machine (Windows XP with IIS 5.1) and access using...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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...
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,...

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.