Solved

Access 2007

Posted on 2013-12-03
11
258 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

 
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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

729 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