Unanswered: Show a message in a form every 10 (or any other set number of) records are filled?
I need the form to, every 10 records are entered, pop up a message display alerting that 10 records have been entered (the db is about purchases and my boss wants to do some quality control every 10 purchases of the same product).
So far I made this query
SELECT IIf([compras]![idcompra]/10=Round([compras]![Idcompra]/10.1),"yes","no") AS hola
Which compares the 10th part of the record count with the 10th part of the record count ROUNDED UP to 0 decimals, and if they are the same, it means it is a multiple of 10 and so it assings the value "yes" to it.
What i need is basically an afterupdate event in the form which looks up the last added value in the query and if it is "yes" pop up a message.
Of course my approach may not be correct, if so please tell me how it should be done. Thank you very much!
Thanks for the reply! but i don't think it'll work to my needs. I need that message to pop up only when the recordcount is 10, or 20, or 30, or 40, etc, by increments of 10. Still, i'll take it from here thank you very much!
Now that i've thought about it better, i don't think that answer would help, because i need the message to show up each time a particular product gets entered every 10 times. Im pretty sure my query comes into play
It isn't clear whether how the query is related to the form, but if you want to respond to record entries in the form,then add the following function to the form module and call from the form's afterupdate event
private Function fSelect(iInterval As Integer)
Dim sng As Single
If isdirty(Me) Then Me.Dirty = False
If Me.Recordset.RecordCount > 0 Then
sng = Me.Recordset.RecordCount / iInterval
If sng = vbInteger Then