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
Auto login Windows 7
Display User Pictures stored in AD (thumbnailPhoto) in Windows 7 and Windows 2008 Logins
Mcaffe EPO 4.5 : deploying new EPO with existing agents
Cisco 1310g Wireless Bridge, Fastethernet Hardware Status Down
Solaris 10 zone fails to start up
memory
Serialize ajax requests with jQuery
Cisco VPN Client 5.0.07.0290 on Windows 7 64 bit
Citrix Printing issue for only one user
How to sync iphone 3.1.3 with exchange server 2003