S
Sareny
I have a paramater report that is based on a combo box (on unbound
form that is called from Report's on open event, form value is used in
Report's Record Source Query).
This works great and I have no complaints about that.
But what I want to do is the following:
Have a MsgBox appear if no records are returned from the Record Source
query and to close the report.
I tried doing this in the No Data Event, but since I use a paramater
form it doesn't work.
Can someone help me determine the best place to run my code?
Dim Msg, Style, Title, Response
Msg = "There are no Active Projects for " & [Forms]![frmParamForm]!
[cmbFindProgrammer] & "." ' Define message.
Style = vbInformation ' Define buttons.
Title = "No Active Projects for Programmer" ' Define title.
Response = MsgBox(Msg, Style, Title)
DoCmd.Close
I'd really appreciate a prompt response as this is an urgent project
request from my boss.
Thank you!
form that is called from Report's on open event, form value is used in
Report's Record Source Query).
This works great and I have no complaints about that.
But what I want to do is the following:
Have a MsgBox appear if no records are returned from the Record Source
query and to close the report.
I tried doing this in the No Data Event, but since I use a paramater
form it doesn't work.
Can someone help me determine the best place to run my code?
Dim Msg, Style, Title, Response
Msg = "There are no Active Projects for " & [Forms]![frmParamForm]!
[cmbFindProgrammer] & "." ' Define message.
Style = vbInformation ' Define buttons.
Title = "No Active Projects for Programmer" ' Define title.
Response = MsgBox(Msg, Style, Title)
DoCmd.Close
I'd really appreciate a prompt response as this is an urgent project
request from my boss.
Thank you!