Solved

Access 2007

Posted on 2013-12-03
11
254 Views
Last Modified: 2013-12-04
I have a main form that displays a subform below.  I would like for the subform to display what is entered on the main form immediately.  I have a save button on the main form and a add button is allow for multiple entries.  But, the subform does not update until I navigate completely out of the form and come back in.  Any help will be deeply appreciated.   Thanks.
0
Comment
Question by:EASCOA
11 Comments
 
LVL 1

Expert Comment

by:SolveEtCoagula07
ID: 39693460
If you post a copy of your database I can try to assist you.
0
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 39693470
0
 

Author Comment

by:EASCOA
ID: 39693583
The main input form is frmEnterUtilityCutsPermit and the tab that contains the form and subform I'm trying to get to work is "Repair Order".  There is one record in the repair table...I have been just adding a new record to the Repair Order and trying to get it to update the subform display.
ExpertHelp-Copy.accdb
0
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

 
LVL 61

Expert Comment

by:mbizup
ID: 39693585
What exactly are you trying to display?

If your subforms are set up correctly, the key fields /linking fields from the main form will automatically populate in the subforms.
0
 

Author Comment

by:EASCOA
ID: 39693614
Actually the subform is created from a query that does some calculations from results entered and a couple of selections entered on the main form.  Do you think that is a problem?
0
 

Author Comment

by:EASCOA
ID: 39693618
Sorry to answer the question I want to display the results.
0
 
LVL 61

Expert Comment

by:mbizup
ID: 39693632
Try this:

1. Create a new code module

2.  Add the following function to the module:

Function RequerySubform()
    Forms!frmEnterUtilityCutsPermit!frmChargeRatesSubform.Form.Requery
End Function

Open in new window


3.  Add the following command to the end of your macro for the Add button

Runcode RequerySubform()
0
 

Author Comment

by:EASCOA
ID: 39693740
Being new to Access 2007...I'm afraid I may have put the code in the wrong place.  Because it still doesn't work.  Sorry for any inconvenience.
COAStreet-2013-12-3StartOfDay-Sw.accdb
0
 
LVL 61

Expert Comment

by:mbizup
ID: 39693782
Unless I'm looking at the wrong form entirely, I don't see where you have tried this at all.

Recapping the steps, with pictures below (Your user interface may look a little different.  The pictures are from Access 2010, but they should give you the right idea)

1. Create a new code module

2.  Add the following function to the module:

Function RequerySubform()
    Forms!frmEnterUtilityCutsPermit!frmChargeRatesSubform.Form.Requery
End Function

Open in new window


3.  Add the following command to the end of your macro for the Add button

Runcode RequerySubform()

Step 1: create a module
Step 2: Add the function to the module
Step 3:  Change the macro
0
 

Author Comment

by:EASCOA
ID: 39693921
Thanks for all the help.
0
 
LVL 61

Accepted Solution

by:
mbizup earned 500 total points
ID: 39694209
Glad to help.  Is this resolved for you now?
0

Featured Post

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question