Results 1 to 2 of 2
  1. #1
    bronson_mech is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2013
    Posts
    94

    i need a pop up msg


    i have a created a databse for material handling wat i need is i have stock query & a issue query, for example i have 10pc of candy in stock... in issue form if i enter 11 pc or more it should give a alert/notification that you don't ve enough stock to issue....... how do i get this pop up msg......

  2. #2
    BluffMeAllIn is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Dec 2013
    Location
    Canada
    Posts
    21
    Hi bronson,

    I am guessing macros but is the database designed using macros or VBA code, essentially a constraint needs to be put in so that the # issued cannot be greater than the # in stock. How this would be done depends on the method of design used in the database.

    If it is through VBA code it would simply fall similar to the below when you click submit or save or whichever action from the issue form that actually executes the issue:
    Code:
    if stockcount < requestedissuecount then
       msgbox "The requested stock to issue is not currently available, there are only " & stockcount & " of this item in stock."
       Exit Sub
    else
       ........ code as currently exists to do the issue
    end if
    For macros, would probably be easier to look at it if you were able to upload the database as I rarily use the macros but am sure I could easily determine how to implement the constraint.

    Thanks,
    Dave
    Last edited by BluffMeAllIn; 12-04-2013 at 10:49 AM. Reason: add code tags

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

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