Microsoft
Software
Hardware
Network
Question : Opening an Access form with allowadditions property set to false and no records found
I have an Access form with the allowadditions property set to false. When the form is opened and no records are found, the form is not displayed and a grey screen shows. How do I check if there are any records selected in the Open or Activate event so that if there are no records found, I won't display the form and instead display a message saying 'no records found' and go back to the form that invoked it in the first place?
Answer : Opening an Access form with allowadditions property set to false and no records found
or you can do this too, from the form that invoke to open the form
private sub cmdOpenForm_click()
if dcount("*","recordSourceOf
theForm")=
0 then
msgbox "No records found"
exit sub
else
docmd.openform "formx"
end if
end sub
Random Solutions
VPN 721 error
VB.NET Setup Installing App Files Without Asking What Folder to Install
publishing websites in TMG 2010
Access the DOM of a pop up window
Upload a file to a ftp server usgin c# and asp.net
Asp.Net I need help. I am not passing Date values to my the Conrol Parameters?? in a SqlDatasource using Ajax
Getting One Row from a ListBox List
If folder does not exist, then create one
Dual WAN on a Fortigate 60
Looking for a CMS solution