Bring to Front

S

SirPoonga

I am haivng another odd error. I have a form with a subfor, You
select a record formt he subform and click a button to bring up an
update form. After updating I refresh the subform. The main form has
focus but the database window is in front of it. How do I bring the
form to front?
 
D

Dirk Goldgar

SirPoonga said:
I am haivng another odd error. I have a form with a subfor, You
select a record formt he subform and click a button to bring up an
update form. After updating I refresh the subform. The main form has
focus but the database window is in front of it. How do I bring the
form to front?

How does the database window get brought to the front? I assume it
didn't start out that way, so there would have to be code that brings it
there. Is there code that calls DoCmd.SelectObject with the
"InDatabaseWindow" argument (or whatever it's called) set to True? It
would seem to be more sensible to eliminate the code that activates the
database window in the first place, rather than worrying about bringing
the main form back to the front or hiding the database window.
 
S

SirPoonga

I didn't use any code to call the database window. I think it is a
bug.

I have a main form. It consists of controls to filter results in a
subform (in datasheet view). I also have an modify button that upon
selecting a record in the subform and clicking the button, will bring
up an update form to update that record's information. You click
update in that form and it will update the record then close the form.
This should leave you back att he main form. However, I am ending up
witht he main form in focus but behind the database window.
 
S

SirPoonga

It must be a bug or something. All I have is a form witha subform.
You select something from the subform and click the update button.
This brings up a form. Once you are done with that form for some
reason the database windows is in front of hte main form but the main
form has focus.

To open the update form I use the DoCmd.OpenForm in the OnClick code
for the main form's button. To close the update form I use a
DoCmd.CloseForm as the last line of executable code after data is
updated or in a close button.
 
D

Dirk Goldgar

SirPoonga said:
I didn't use any code to call the database window. I think it is a
bug.

I have a main form. It consists of controls to filter results in a
subform (in datasheet view). I also have an modify button that upon
selecting a record in the subform and clicking the button, will bring
up an update form to update that record's information. You click
update in that form and it will update the record then close the form.
This should leave you back att he main form. However, I am ending up
witht he main form in focus but behind the database window.

That seems strange, and I haven't encountered anything like it. If you
post the code behind the modify button (on the main form), and *all* the
code behind the update form, maybe the reason for it will become
apparent.
 
S

SirPoonga

It's not doing it now?!?!? Hmmm. I have a feeling it had something to
do with debugging.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top