M
Mark
Hi,
I have a form, "formRegistrationApproval", which is based
off of a query that fills the form with class registration
information from a table, "tableClassRegistration". The
query returns records that have not been approved or
denied yet. On my form, after I approve/deny the last
record the query returns no more records (which is running
correctly), but the form is now blank. I would like the
form to display a message box stating that there are no
more records to approve/deny at this time as with the
following message:
MsgBox "There are no additional approvals to be made at
this time.", vbCritical, "End of Registration Approvals"
How would I go about getting my form to display this
message when no more records are returned by my query and
then when the user presses "ok" the form closes???
Thanks for helping me out with this!!!!!!!!!!!!!!!!!!
Below is the command button properties that I have on my
form that saves the record and then requeries the records
from the table (returning the records that have not been
approved/denied yet):
Private Sub SaveRecordRequery_Click()
On Error GoTo Err_SaveRecordRequery_Click
If IsNull(Me.ClassApproved) Then
MsgBox "You must select Yes or No before saving
registration approval.", vbInformation, "Please Select Yes
or No"
End If
DoCmd.DoMenuItem acFormBar, acRecordsMenu,
acSaveRecord, , acMenuVer70
Forms.formRegistrationApproval.Requery
Exit_SaveRecordRequery_Click:
Exit Sub
Err_SaveRecordRequery_Click:
MsgBox Err.Description
Resume Exit_SaveRecordRequery_Click
End Sub
I have a form, "formRegistrationApproval", which is based
off of a query that fills the form with class registration
information from a table, "tableClassRegistration". The
query returns records that have not been approved or
denied yet. On my form, after I approve/deny the last
record the query returns no more records (which is running
correctly), but the form is now blank. I would like the
form to display a message box stating that there are no
more records to approve/deny at this time as with the
following message:
MsgBox "There are no additional approvals to be made at
this time.", vbCritical, "End of Registration Approvals"
How would I go about getting my form to display this
message when no more records are returned by my query and
then when the user presses "ok" the form closes???
Thanks for helping me out with this!!!!!!!!!!!!!!!!!!
Below is the command button properties that I have on my
form that saves the record and then requeries the records
from the table (returning the records that have not been
approved/denied yet):
Private Sub SaveRecordRequery_Click()
On Error GoTo Err_SaveRecordRequery_Click
If IsNull(Me.ClassApproved) Then
MsgBox "You must select Yes or No before saving
registration approval.", vbInformation, "Please Select Yes
or No"
End If
DoCmd.DoMenuItem acFormBar, acRecordsMenu,
acSaveRecord, , acMenuVer70
Forms.formRegistrationApproval.Requery
Exit_SaveRecordRequery_Click:
Exit Sub
Err_SaveRecordRequery_Click:
MsgBox Err.Description
Resume Exit_SaveRecordRequery_Click
End Sub