Access 2010 trouble with tabs

Posted on 2011-04-26
Last Modified: 2012-05-11
Hi, Experts -
I have a simple stand-alone Access 2010 database (.mdb - using 2003 compatibility because we have a few stragglers who have not yet been upgraded). The users like tab controls. So, I created a form with sub-forms on each tab. So far, just two tabs each with their own sub-form.

On main form (first tab) - a combo box displays all employees.  Once an employee is selected,   Sub-form1 displays the fields from a query executed with code tied to the AfterUpdate event on the combo box.  All is fine there.

But the second tab's sub-form2 - which is supposed to display rows from a second query...also executed in the same code on the AfterUpdate event - displays nothing at all.  In the header portion of Sub-form2, I have the following Iif stmt, which is referencing fields in the query executed:  
     =IIf([ID]<>"",[EEName],"No Tuition Apps found for " & [EEName])

What am I doing wrong?
Question by:OGSan
    LVL 22

    Accepted Solution

    Difficult to say what is wrong based on this information. Could you upload and example with these forms and the queries and tables they need (and some fake data). Or could you at least copy the code from the AfterUpdate event.

    I suppose you set the RecordSource property for the subform in your code. You could set a breakpoint on this line and put the value of the RecordSource property in the immediate window. Then you paste this SQL in a new query and check if it returns any results.
    LVL 30

    Assisted Solution

    check link fields from both main and child forms on both tabs.
    LVL 1

    Author Comment

    Thanks for the replies, Nicobo & hnasr.  I managed to figure out the problem(s) on my own.  Turned out my underlying query needed to be rewritten.  Splitting points between you but weighting more with Nicobo for his added thoughtfulness.  Thanks, again.
    Jeff (aka OGSan)

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    Suggested Solutions

    Title # Comments Views Activity
    query error in access 2010 dao 3.6 5 28
    Order by 8 21
    Parse a text field in access query 8 12
    another query question 7 0
    Today's users almost expect this to happen in all search boxes. After all, if their favourite search engine juggles with tens of thousand keywords while they type, and suggests matching phrases on the fly, why shouldn't they expect the same from you…
    I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
    Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
    In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

    746 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

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now