Results 1 to 5 of 5
  1. #1
    msmithtlh is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2013
    Posts
    151

    Continuous form not showing data from the underlying query

    I have a continuous form based on an underlying query.

    The query displays the correct data.

    The form uses two cascading combo boxes to make selections, which are working correctly. When I run the query putting those fields from the form in the query criteria, it gives me the expected data.

    The form header with the combo boxes is working correctly. The detail portion of the continuous form is all blank

    The query is "team members qry"
    The form is "team members"

    Test values: Congregation: Trinity UMC
    Team Leader: Robert Gibbs

    Zipped database attached.

    Many thanks!!test.zip

  2. #2
    davegri's Avatar
    davegri is offline Excess Access
    Windows 10 Access 2019
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,740
    You don't need to do the team search; the filter is already applied by the form's recordsource query criteria.

    Code:
    Option Compare Database
    Option Explicit
    
    
    Private Sub cboteam_AfterUpdate()
    '    If (Me.cboteam & vbNullString) = vbNullString Then Exit Sub
    '    With Me.RecordsetClone
    '        .FindFirst "[Team_ID] = " & Me.cboteam
    '        If Not .NoMatch Then
    '            Me.Bookmark = .Bookmark
    '        End If
    '    End With
        Me.Requery
    End Sub
    
    
    Private Sub Form_Current()
        'Me.cboCongregation = ""
    End Sub
    
    
    Private Sub cboCongregation_AfterUpdate()
        'Me.cboCongregation.Requery
        Me.Requery
    End Sub

  3. #3
    msmithtlh is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2013
    Posts
    151
    Thank you!! That worked. I thought you could add and update records in a continuous form, but this isn't allowing me to add or update. Is there something I can change to allow that?

  4. #4
    davegri's Avatar
    davegri is offline Excess Access
    Windows 10 Access 2019
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,740
    Quote Originally Posted by msmithtlh View Post
    Thank you!! That worked. I thought you could add and update records in a continuous form, but this isn't allowing me to add or update. Is there something I can change to allow that?
    The form will not allow updates or additions because of the underlying query. That query (Team Members qry) is non-updateable because it includes 5 tables.
    You'll need to decide what the form actually needs to do and then design a simplified query to accomplish that.

  5. #5
    Micron is offline Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,421
    The form will not allow updates or additions because of the underlying query.
    That is why I
    a) recommend basing forms/reports on queries, not tables (not even single table queries)
    b) building query first, then test if suitable. If not, there's no sense in building a form or report based on it then finding out you can't work with it.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 9
    Last Post: 07-02-2022, 08:08 PM
  2. Replies: 6
    Last Post: 01-21-2021, 04:57 AM
  3. Continuous form is showing first record 680 times???
    By scott0_1 in forum Programming
    Replies: 9
    Last Post: 06-22-2018, 10:49 AM
  4. Continuous form showing new record
    By NISMOJim in forum Forms
    Replies: 4
    Last Post: 07-25-2015, 01:03 PM
  5. Replies: 0
    Last Post: 03-13-2012, 12:57 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums