Hi All
I am getting a little frustrated at my own inability, so please bear with me!
Upon entering a date on a form I wish to check to see if there are more than, say 8 occurrences of this date, as I cannot ship more than 8 times a day.
I first of all created a TOTALS query that referenced the form date: [Forms]![Work Orders New]![Operations Confirmed Date] and used the count on the ID field, this return the correct count of records.
I believe in researching this that a better way to get an answer into VBA is with the DCount function.
I created the following in a text box just to see if I could make this work:=DCount("[ID]","Works Orders","Operations Confirmed Date=[Forms]![Work Orders New]![Operations Confirmed Date]") however this returns a count of the total number of records??
All advice warmly welcomed!
Once I can get this working, I need to ultimately put the correct code into the on dirty function of "Operations Confirmed Date" that if the count is greater than 8, then a message box pops up saying too many shipments on selected day.
Carl.
I am getting a little frustrated at my own inability, so please bear with me!
Upon entering a date on a form I wish to check to see if there are more than, say 8 occurrences of this date, as I cannot ship more than 8 times a day.
I first of all created a TOTALS query that referenced the form date: [Forms]![Work Orders New]![Operations Confirmed Date] and used the count on the ID field, this return the correct count of records.
I believe in researching this that a better way to get an answer into VBA is with the DCount function.
I created the following in a text box just to see if I could make this work:=DCount("[ID]","Works Orders","Operations Confirmed Date=[Forms]![Work Orders New]![Operations Confirmed Date]") however this returns a count of the total number of records??
All advice warmly welcomed!
Once I can get this working, I need to ultimately put the correct code into the on dirty function of "Operations Confirmed Date" that if the count is greater than 8, then a message box pops up saying too many shipments on selected day.
Carl.