pop up works.. subform not

alaric

Registered User.
Local time
Today, 16:01
Joined
Sep 6, 2004
Messages
50
I m confused

I have a form with a subform. I try to show all detail records of the selected record in the listbox (bound). It does not work!
When I try to the same with a pop-up (and a button to activate it) it works OK
Cant this be done with a sub form? what am i doing wrong?

Al
 
Bound (urgh)...

You'd need the query for the subform to be pointing (and filtering) on the open forms listbox.

Then you need on the on_click event of the list box a subformname.refresh or subformname.requery.


Vince
 
thx for your reaction

pointing to the listbox doesn't give the right results, because the detail come from diff. table.
suggestions?

Al
 
Oh, I assumed that hte listbox was on the top form and the sub form showed the results depending on the selection in the list box....

Same principle, but with the listbox instead, filters on a specific search field in the top form and then needs requerying... not quite sure how you'd do that as I don't use subforms.

I don't like the way a subform doesn't appear to work with methods/properties as easy as the form the user has active.


Vince
 
thx for your suggestion

I'm a bit further now..
the thing now happens is:
on opening the form it shows the right details!
when selecting a different student in the listbox it doesnt change the subform :confused:

Im using this code:
Private Sub lstCursist_AfterUpdate()
Dim strFilter As String
strFilter = "(CursistID = " & Me.txtCursist.Value & ") "

Me.[SFInschrijfHistorie].Form.FilterOn = True
Me.[SFInschrijfHistorie].Form.Filter = strFilter
'Forms!MainFormName!SubformName.Form.ListboxName.Requery
Me!SFInschrijfHistorie.Form.Requery
'Me!subformControlName.Form.Requery

End Sub

as you see I tried differnt ways to get the requery done. But so far NO LUCK, Im stuck

Hope anyone can help me

Al
 

Attachments

Have you tried converting the combobox, which you says works, to a listbox?

Select the good combo box in Design view. Go to the menu-item Format, Change To, List Box.
 
As you can see in the att. the mainfrm has a listbox fromwich the user can choose.
problem still is that it does not update the subform.
Whe closing the form and reopen it, the subforms shows the last item selected on the listbox.

hopes this makes it more clear?

Al
 

Users who are viewing this thread

Back
Top Bottom