go from code to open form and back access 2003

L

lewie

I run some code that fills in a form. I would like to have it jump to
the form and after someone edits it continue on in code.
Is there a way to do this. I tried setfocus; open another form;
gotocontrol so far...
Thanks.
Lewie
 
F

fredg

I run some code that fills in a form. I would like to have it jump to
the form and after someone edits it continue on in code.
Is there a way to do this. I tried setfocus; open another form;
gotocontrol so far...
Thanks.
Lewie

Open the form in acDialog.
Code will stop running until the form is filled in and a command
button on the form is clicked:

DoCmd.OpenForm "FormName" , , , , , acDialog
' ...Additional code here as needed.
....
....
DoCmd.Close acForm, FormName

Add a command button to the form to hide it:
Me.Visible = False

Fill in the form data, click the command button, and code will
continue. Then it will close the form.
 
L

lewie

Thanks that works good. I would like to goto a form that is already
open and completed.
I have to close and reopen the form to get this to work. When i do that
when i get to the second record the first one displays again. this is
what i got:
1. I open a form
2. depending on data in the first recordset(which is a query) I
autofill the form.
3. I would like the user to be able to edit the form(this is where I
need to get to the form)
4. I have a button on the form to email a report which uses the data
off the form.
5. I move to the next record in the query and process it.
Any ideas are welcome I am building this from scratch so if I am way
off track let me know or if you have done something like this in the
past I would appreciate an outline of steps. I have the query which
contains things to be ordered and a contact table with contacts and a
lookup table to determine which contact for which type of item.
Thanks.
 

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