Refresh

D

DeVille

Hi
I have a sub form on a Tab in my main form,there is a
drop down box(Combo1) on the main form which I can use to
select a customer ID, which links the customer details in
the sub-form to the main form, the problem is that after
I have select the Customer ID, the customer details do
not appear strait away in the sub form, I have to go to
the next record then when I come back to that record and
the details have appeared in the sub form, if any one can
help me with some code to refresh the sub form when
make the selection in my combo box in the main form
thanks in advance.

I think it should be something like this? But I'm very
new to this

Private Sub Combo1_AfterUpdate()

Me!MainForm!SubForm.Refresh

End Sub
 
V

Van T. Dinh

If I read your earlier post correctly, I think your Form /
Subform is fairly non-standard. The normal set up is that
the main Form is bound to the "One" Table and the Subform
is bound to the "Many" Table.

Try with the normal set-up.

If you still can't work out, re-post with precise and
relevant details of your Tables (including PrimaryKey +
ForeignKey Fields) and their relationship, your Form /
Subform (RecordSources, Link Fields) and your ComboBox
(RowSource, bound to which Field or unbound), ...

HTH
Van T. Dinh
MVP (Access)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top