Help with a counter

davealot98

New member
Local time
Today, 10:52
Joined
Feb 15, 2017
Messages
3
Greetings,
I am hoping I can retrieve some assistance from you all if possible. I've attached a database I am working on internally where I work for our injection department. What I cannot for the life of me figure out is when the form "Mold Loading" is opened there are two visible and two hidden fields present and a command button. I need the command button to take the "Mold" field, find that specific mold in the "Mold" table, and add +1 to that field and then close out the open form.

Additionally I need to send out an email to multiple people if the field "Cycle count" matches the field "PM Cycle Set" in the "Mold" table. Any help would be greatly appreciated. Thank you Gentlemen/Women!
 

Attachments

lookup the current number
txtBox = Dmax("[ID]","table") + 1

but if you have a 'mold' field:
txtBox = Dmax("[ID]","table","[type]='Mold'") + 1
 
Ranman,
I appreciate the help. Full disclosure I think I may be a bit too dumb to fully understand your reply however. Will this take the mold that is entered in the open form, find it in the exisiting table and add one to the counter when a command button on the form is clicked? Thank you kindly, again I greatly appreciate it.
 
this code would go in the button click event.
the textBox be the counter field.
if you DONT want to overwrite the existing counter, then you must make an append query to add the new counter and data.
 
Ranman I appreciate the help bud but on my form in the database I attached called "Mold Loading" there is both a press drop down box that is pulling from one table and the mold drop down box that is pulling from another table, on the mold table is the form for the counter. When I attach the code you wrote and run it it just errors out I think because I don't actually have a "Counter" field, I just need it to add +1 to the counter field on the mold table itself...I hope I'm explaining that correctly. Thank you very much for the assistance I am very appreciative.
 

Users who are viewing this thread

Back
Top Bottom