Multiple Criteria to be met before saving form data.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Becker
    New Member
    • Jul 2012
    • 54

    Multiple Criteria to be met before saving form data.

    Sorry for all of the questions the last couple of days and much thanks to those who have helped me. I have only 5 hours to finish this database.

    I was just told that they want much about this database redone. Attached is a zipped access file with the parts that I need help with.

    Open the form "Enter Inventory" and choose a monument. Users should enter in the current stock. When they hit submit I want it to save the values here under "Item" and "Current Stock" to the table "Inventory Information under "Chemical" and "Current" but only for records where the value under current stock is less than the value under "reorder point." I also want the current date to go into "Date" on "inventory information."

    I also do not want them to be able to click submit if there are any values in current stock that are not numbers or are blank.

    I have worked with this for a while and I am stumped. I am running out of time and am desperate for help. Thanks for all that you guys do.
    Attached Files
  • zmbd
    Recognized Expert Moderator Expert
    • Mar 2012
    • 5501

    #2
    No backend file....
    Hard to work with the forms etc without at least a blank table or two.

    I think however you have asked and answered your own question...
    Open your recordsets agains the tables
    Then when user submits, poll the RS for the values in question (actully... you might be able to just do a dlookup with just one or two things to check even in a large database against indexed fields that wouldn't take very long)
    Now do your RS updates as normal...

    [[ (and the twins are up :) - it's my day off :) ]]

    I'll check back in a little bit to see how things are progressing for you; however, I'm thinking you're not going to make the deadline.
    Last edited by zmbd; Sep 7 '12, 07:48 PM. Reason: added a thought or two after looking at the posted database.

    Comment

    • Becker
      New Member
      • Jul 2012
      • 54

      #3
      Sorry I forgot the back end. Here is the file with what I have accomplished so far. All I have left is (under the submit button code) I want the email to be sent to the person listed under purchaser for the monument that is selected. I tried a dlookup as you can see but I am not sure what I did wrong there. It works fine if I just type an email in, but that email isn't always going to be the same.

      The other thing I need to do is under the body of the email being sent here I want it to say how many new orders there are. This is basically just the number of records in the "find needed orders" query. I tried dcount but again I am not sure what I did wrong. Thanks.
      Attached Files

      Comment

      • Becker
        New Member
        • Jul 2012
        • 54

        #4
        Got it fixed. Sorry I have just been freaking out because of my deadlines. I did make it in time though! Now I can celebrate and relax! Thanks for all of your help.

        Comment

        • zmbd
          Recognized Expert Moderator Expert
          • Mar 2012
          • 5501

          #5
          in closing :)

          I'm glad you meet the deadline!
          I think that many of us have had the same experince at one point or another.

          If you still need work on the email question, please repost it in a seperate thread. Also, you might do a search on this site.

          DLookup can take a string variable in the criteria... main thing is using the correct syntax for the datatype " ' " vs " # " etc...

          -z

          Comment

          Working...