By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,466 Members | 1,756 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,466 IT Pros & Developers. It's quick & easy.

Multiple Criteria to be met before saving form data.

P: 54
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
File Type: zip bytes help.zip (45.8 KB, 46 views)
Sep 7 '12 #1
Share this Question
Share on Google+
4 Replies


zmbd
Expert Mod 5K+
P: 5,286
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.
Sep 7 '12 #2

P: 54
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
File Type: zip bytes back.zip (247.7 KB, 51 views)
Sep 7 '12 #3

P: 54
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.
Sep 7 '12 #4

zmbd
Expert Mod 5K+
P: 5,286
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
Sep 8 '12 #5

Post your reply

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