Results 1 to 4 of 4
  1. #1
    SamCrow is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2014
    Posts
    11

    How to flag a warning

    Hey guys,

    I'm still a bit new to microsoft access as I am still learning.
    I have a customer related database and I want to make a warning window when the customer enters a quantity that is greater than the quantity on hand.
    So if there are 150 kitkats on hand, and the customer enters >150 then it will give me a warning sign.

    Is there a way that I can do that?



    Thanks

  2. #2
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows XP Access 2003
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,610
    How will you calculate the "quantity on hand".
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  3. #3
    SamCrow is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2014
    Posts
    11
    I subtract the Quantity on hand from the Quantity that the customer wants.
    So it is as follows: Quantity on Hand: [Qty]-[Quantity]
    That's how my entities are named.

  4. #4
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows XP Access 2003
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,610
    You will need some code in the Before Update event of the control in which the user enters the qty. If the user is trying to enter a figure greater than the quantity in hand, the event can be cancelled wth:
    Cancel = True
    which you could follow with a line to inform the user:
    Msgbox "Please enter a quantity that is equal to, or less than the quantity in hand."
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Current Location Flag
    By mhankins in forum Access
    Replies: 2
    Last Post: 07-03-2013, 02:02 PM
  2. Clearing a boolean flag
    By accessnewb in forum Programming
    Replies: 14
    Last Post: 08-12-2011, 07:54 AM
  3. Date flag
    By glasgowlad1999 in forum Forms
    Replies: 5
    Last Post: 02-15-2011, 06:13 AM
  4. flag in access
    By bold01 in forum Access
    Replies: 9
    Last Post: 02-03-2011, 11:08 AM
  5. Flag A Data Block
    By JohnBoy in forum Programming
    Replies: 7
    Last Post: 06-29-2010, 01:18 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums