My Assistant
![]() ![]() |
|
|
Jan 17 2005, 10:04 AM
Post
#1
|
|
|
UtterAccess Addict Posts: 234 |
On the main active form I use this code on before insert, and I tried it on after insert to see if this worked.
CODE If Me.Form.Recordset.RecordCount = 0 Then DoCmd.Close acForm, "frm_view_property", acSaveNo DoCmd.OpenForm ("frmnorecordproperty") End If I got this to work when I call it to subforms, but for some reason I can not seem to make it to work for the main form. All help is apprecieated. Louis |
|
|
|
Jan 18 2005, 12:34 AM
Post
#2
|
|
|
UtterAccess Veteran Posts: 354 From: Australia |
I have tried something similar in the past. I assume you are testing the condition on the Onopen procedure? Apparently Access doesn't like you closing the form that its hasnt finished opening yet!
In the end i checked the condition before opening the form when i was about to navigate to it. I'm not sure of your setup so i am not sure if this will help you in anyway. |
|
|
|
![]() ![]() |
|
Go to Top · Lo-Fi Version | Time is now: 20th May 2013 - 12:30 PM |