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, I can approve/deny a record then
press a command button that requeries and returns any
remainding records that have not been approved/denied.
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 code/message:
MsgBox "There are no additional approvals to be made at
this time.", vbCritical, "End of Registration Approvals"
How can 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 click command button properties of the "save
record/requery" 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, I can approve/deny a record then
press a command button that requeries and returns any
remainding records that have not been approved/denied.
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 code/message:
MsgBox "There are no additional approvals to be made at
this time.", vbCritical, "End of Registration Approvals"
How can 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 click command button properties of the "save
record/requery" 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