View Single Post
  #3  
Old October 12th, 2005, 10:43 PM
Chris
external usenet poster
 
Posts: n/a
Default

Thanks, Albert.

Your assumption re the typo is correct.

All three forms are now popup = no, modal = yes.

Still, on closing [frmEmployeeSetup], [frmEmployee] disappears.

You should be aware that everything works fine until I CLOSE
[frmEmployeeSetup]. after all other code executes. (I followed it through.)
I modified your suggested code to reflect being in the closing routine of
[frmEmployeeSetup], where the dissaperance happens. Also, you should know
that I wish the user to close the setup form and view the record of the
employee just setup.

What else can you suggest?

--
Thanks for your help,
Chris


"Albert D.Kallal" wrote:

First, I have to assume this is a type-o


frmEmployeeSetup called via button on frmEmployeeSetup, user closes when



How can the button on the form call it's self? can I guess that you mean:

frmEmployeeSetup called via button on frmEmployee, user closes when


Why does frmEmployeeSetup need to be popup if it is model? If you make each
form model then the user has to traverse back the same way they came.

Problem is: when closing frmEmployeeSetup frmEmployee closes or goes
stealth and the focus is on frmClient.


The above is not normal behavior, and should not be happening.

My guess is that you got a popup setting on some form(s) that should not
have that setting. You ONLY need popup if you want that form to "stay" on
top, but USE other form. Since you want to return to the previous form, then
remove all popup settings, since as far as I can tell, you don't need them.

Do remember that calling code does NOT wait when you execute the
docmd.openform, so perhaps that is a issue. I would suggest simply removing
the popup status, since if it is model, then it has to stay on top of the
previous form anyway.

The other thing of course is that you should execute a disk write in most
cases RIGHT BEFORE you open a form. This not only saves data before leaving
a form and having a potential problem, but then things like the autonumber
id, and data is written, and thus when modified by other forms you don't
get that nasty "record has been modified by other users".


so, go:

me.Refresh
docmd.OpenForm "frmEmployeeSetup",,,"id = " & me!id

I put in the "were" clause, but I figure you might be loading the setup form
to the one record...

So, any reason why you don't just use model in all 3 cases?

And, don't confuse model, or popup forms with dialog forms...they are quite
different....

You can read about them he
http://www.members.shaw.ca/AlbertKal...log/Index.html

--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada

http://www.members.shaw.ca/AlbertKallal