Advertisement

08.05.2008 at 09:39AM PDT, ID: 23622873
[x]
Attachment Details

What is the best way method to Open a different form, close the current and refresh(requery) database using VBA?

Asked by future_hooves in Access Coding/Macros, Access Architecture/Design, Access Forms

Tags: Microsoft, Access, 2007, VBA

Hello Experts,

I have constructed a databse using about 5 or 6 different forms.  I would prefer when a user clicks on a button that the current form closes while the selected forms open and when it does it refreshed on opening.  What is the best way to do this with VBA?

should it looks something like this?
Private Sub cmdOpenfrmCustomers_Click()
DoCmd.Close (this would close the currently opened for)
DoCmd.OpenForm "frmCustomers"
---some kind of refresh command---
end sub

Thanks,

Terry
Start Free Trial
 
Loading Advertisement...
 
[+][-]08.05.2008 at 09:46AM PDT, ID: 22162713

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Access Coding/Macros, Access Architecture/Design, Access Forms
Tags: Microsoft, Access, 2007, VBA
Sign Up Now!
Solution Provided By: jimhorn
Participating Experts: 2
Solution Grade: A
 
 
[+][-]08.05.2008 at 09:47AM PDT, ID: 22162724

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.05.2008 at 11:28AM PDT, ID: 22163593

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.05.2008 at 11:30AM PDT, ID: 22163616

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08.05.2008 at 11:32AM PDT, ID: 22163640

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08.05.2008 at 11:33AM PDT, ID: 22163642

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.05.2008 at 11:34AM PDT, ID: 22163653

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.05.2008 at 11:38AM PDT, ID: 22163705

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08.05.2008 at 11:39AM PDT, ID: 22163719

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628