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
Server 2008 NLB problem
Extremely slow access to Redirected Folders in SBS2008 with XP Pro clients
How do I read an unsigned character in C#?
Appointment booking app or service for field engineers?
How do I change the default directory for program files in server 2008 r2?
Replacing SAN-added UCC SSL Cert
Remote Desktop Connection to Windows SBS 2008
EIGRP Feasibility Condition
why avoid system tables?
Inaccurate color printing from Indesign CS2 to a PS laser printer