Requery problem

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Tcs (tsmith_at_eastpointcityNoSpamorg)
Date: 11/23/04


Date: Tue, 23 Nov 2004 16:18:03 -0500

I have a form with a subform. The form has two combo boxes, and the subform is
a continuous form to display the records that the two combo boxes select.

I seem to have the combo boxes working except for:

Combo box 2 only correctly shows what it should after opening the form. If I go
back to combo box 1 again, then back to combo box 2, it still shows what it had
from the first time I went to it.

Combo box 1 uses a query:

SELECT DISTINCT
        [tblSubModules].[MetaSchema],
        [tblApplications].[Application]

FROM
        tblSubModules
INNER JOIN
        tblApplications
ON
        ([tblSubModules].[CatalogVers]=[tblApplications].[CatalogVers]) AND
        ([tblSubModules].[MetaSchema]=[tblApplications].[MetaSchema])
ORDER BY
        [tblSubModules].[MetaSchema], [tblApplications].[Application];

As does combo box 2:

SELECT DISTINCT
        tblSubModules.CatalogVers,
        tblSubModules.MetaSchema

FROM
        tblSubModules
WHERE
        (((tblSubModules.MetaSchema)=[Forms]![frmSubModules].[MetaSchema]))
ORDER BY
        tblSubModules.CatalogVers, tblSubModules.MetaSchema;

And the requery?

No compiler errors, but nothing happens either. Once it appeared that the
subform flashed, ever so slightly, after I made my combo box 2 choice. But
other than that, nothing seems to be happening. All I see displayed in the
fields is "#Name?" as was dislayed when the form opened. Here's my event
procedure code for combo box 2:

Private Sub cbxCatalogVers_AfterUpdate()
On Error GoTo Err_cbxCatalogVers_AfterUpdate

    Forms!frmSubModules!subSubModules.Form![CatalogVers].Requery

Exit_cbxCatalogVers_AfterUpdate:
    Exit Sub

Err_cbxCatalogVers_AfterUpdate:
    MsgBox Err.Description
    Resume Exit_cbxCatalogVers_AfterUpdate
    
End Sub

If you could help shed some light on why I can't my subform to display the
reocrds I want, and what I have to do to make that happen, I surely ould
appreciate it. And perhaps you might even know why combo box 2 only works once
after opening the form? Any and all help is appreciated.

Thanks in advance,

Tom



Relevant Pages

  • Re: error 3048 - Cannot open any more databases
    ... The combo that uses the callback function as its RowSourceType will still be able to display the desired data. ... What happens is that you load the static array one, and then it calls the callback function whenever it needs a value. ... I am using these combo boxes not only as a way of selecting a ... > the same subform, just inserted 48 times. ...
    (microsoft.public.access.formscoding)
  • Re: error 3048 - Cannot open any more databases
    ... Yes the bound column of my combo boxes are not the display column. ... decrease my open connections, since ultimately that is what I am after. ... the same subform, just inserted 48 times. ...
    (microsoft.public.access.formscoding)
  • Re: ADP bound form refresh after subform record delete?
    ... on the mainform with the following event: ... I have a continuous subform "Sub" using a Select statement as a record ... table and then I Refresh the Main form to display the updated data. ... This event works fine if I am adding or editing records in Sub. ...
    (microsoft.public.access.adp.sqlserver)
  • Re: error 3048 - Cannot open any more databases
    ... recommendations and I declared my array as static and also loaded the array ... Yes the bound column of my combo boxes are not the display column. ... the same subform, just inserted 48 times. ...
    (microsoft.public.access.formscoding)
  • RE: Multiple combo boxes controlling contents of subform?
    ... Combo#_Entercode in to clear the other combo boxes. ... Private Sub Combo2_Enter ... > Employee, Team Lead, Case Number, Date Case Opened, etc. ... > So far, I have combo boxes that display the correct items, and a subform ...
    (microsoft.public.access.formscoding)