Simple open form questions

ilyavol

New member
Local time
Today, 07:08
Joined
Jun 25, 2001
Messages
5
I just started with access, and I ran into a small problem. I have a button set up to open up a form, but when it does it sends to to the back, behind the current form. My questions are: using code how do I bring an open form to the front and have it recieve focus; and how do I close a form that is not currently selected. (I've been closing with a simple "DoCmd.Close" but would like to know how to do it by specifying a form) Thanks in advance!
 
In order to close any object that is open you still use the docmd.close but you have to specify what you are closing... if you type in docmd.close then hit the space bar, you'll see the options pop up.. Below is an example...

DoCmd.Close acForm, "FormName", acSaveNo

Hope this helps.

Doug
 
At a guess - is the calling form a popup and the launched form not? That would send the new one to the back

HTH

Drew
 
How are you

I'm relatively new to access myself.
Here is a sort of help that I use to help teach myself the vba code used in command buttons.
Create a test database for yourself with test forms and tables etc. Use the command button wizard to create different buttons and then view the code and make different changes until it does what you want. I then name the forms to what the button does so I can go back and look again in case I forget.
Can practice on other things as well queries, reports, etc... If you've ever experimented with a working database and changed the data type or something and lost alot of data (Like the knucklehead me did) you'll appreciate having this.
 

Users who are viewing this thread

Back
Top Bottom