473,799 Members | 3,382 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to diplay an error massege

6 New Member
i have a table called main which allows the user to enter values and they will be stored in the table named main. this contains data of all the items the user has issued to the company. and this will update the qty on column of the products table aswell. on the products table there s another column called ReOrderLevel, which is defined by me and which contains the qty which if goes below the level the user shud order that particular product.

and now what i want to do is when the user updates the form 'main' to get the re order level and compare it with qty on hand and then if qty on hand is below the re order level, to display a msg in order to inform the user that he is running out on stock on particular products

i have made a query and got the report to display all the products which has the quantity below the re order level. and i have an update query to update the quanity on hand when an product is issued using the form 'main'

what i want to kno is to which control shud i apply the code? will i have to make a new form? do i have 2 make changes to my database?
my db is attatched below

it will be great if i cud get an answer soon.
thanx
Attached Files
File Type: zip Accessories09_2009-12-10.zip (122.9 KB, 51 views)
Dec 10 '09 #1
1 1295
ADezii
8,834 Recognized Expert Expert
@aBheE
You could place the following code in the Click() Event of the Done Command Button. I'm assuming that all Fields have Values contained within, so I'll leave Validation to you.
Expand|Select|Wrap|Line Numbers
  1. Dim intReorderLevel As Integer
  2.  
  3. intReorderLevel = DLookup("[ReorderLevel]", "Products", "[P_Name] = '" & Me![Combo0] & "'")
  4.  
  5. 'If the Stock on Hand + the Quantity being Added > the Reorder Level
  6. If (CInt(Combo0.Column(2)) + CInt(Nz(Me![Text7], 0))) > intReorderLevel Then
  7.   MsgBox "Time to Reorder " & Me![Combo0], vbCritical, "Reorder Product"
  8. End If
  9.  
  10. DoCmd.Close
Dec 11 '09 #2

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

Similar topics

2
4382
by: AIM | last post by:
Error in msvc in building inheritance.obj to build hello.pyd Hello, I am trying to build the boost 1.31.0 sample extension hello.cpp. I can not compile the file inheritance.cpp because the two files containing some templates: adjacency_list.hpp and mem_fn.hpp can not compile. Does anyone have any solutions?
2
2977
by: Gregory | last post by:
Hi, One of the disadvantages of using error handling with error codes instead of exception handling is that error codes retuned from a function can be forgotten to check thus leading to unexpected run-time problems. Exceptions on the other hand can not be simply ignored. In order to solve this error codes problem I suggest using error object instead of error codes. Each function has to return an error object that stores an error
13
6621
by: deko | last post by:
I use this convention frequently: Exit_Here: Exit Sub HandleErr: Select Case Err.Number Case 3163 Resume Next Case 3376 Resume Next
7
5035
by: p | last post by:
WE had a Crystal 8 WebApp using vs 2002 which we upgraded to VS2003. I also have Crystal 9 pro on my development machine. The web app runs fine on my dev machine but am having problems deploying. I created the websetup and built the MSI, have the bundled version. Copied to webserver and ran Websetup.msi. Said I had to remove old version, which I did, then reran WebSetup.msi and keeps giving me this error. "The installer was interrupted...
3
1149
by: Howard | last post by:
Help, How Do I diplay '&' as text on a comand Button !
3
16253
by: Manuel | last post by:
I'm trying to compile glut 3.7.6 (dowbloaded from official site)using devc++. So I've imported the glut32.dsp into devc++, included manually some headers, and start to compile. It return a very strange error. In your experience, where I should looking to find the real error? Surely the sintax of glut is correct... gcc.exe -c glut_bitmap.c -o glut_bitmap.o -I"C:/Dev-Cpp/include" -I"../../include" -D__GNUWIN32__ -W -DWIN32 -DNDEBUG...
0
933
by: moumita | last post by:
How to diplay a bitmap on form load. I want to display multiple bitmaps treating the form as a xy coordinate form. How do I scale a form as a xy coordinate screen.On various positions I want to display the bitmaps. Do you have a sample code for tht.
15
1721
by: JonnyB | last post by:
Hi all, There are three tables in my database user, job and booking. It’s a job booking system so users login and make a booking against a job. I’m trying to get a button to display an error message if they try to make a booking but already have made 15 or more. Below is the code I’ve got so far can anyone help me to get it working or point me in the right direction. Private Sub btnEngCreateBooking_Click() Dim username As String Dim...
1
2376
by: muralidharchaturvedi | last post by:
I am using Tataindicom brod band i get java script error on my web mail while sending mail it takes at least two or three attempts to send one mail and i cant log out of web mail page i get java script error (0) massege any help and solutations. regards muralidhar chaturvedi
0
1320
by: daddyb1 | last post by:
RE: http://www.thescripts.com/forum/thread491642.html ###email removed### May 16th, 2006 10:35 AM Hi, Using Console.Writeline, as while ((strLine = stream.ReadLine()) != null) { sb.Append(strLine); Console.WriteLine(strLine); } this writes all the data to the screen at one go. Is there away to
0
9688
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9544
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10490
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10259
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10238
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7570
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6809
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5467
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3761
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.