refresh or requery for a subform

G

Guest

hi all

I got a form1, with a subform1, and a command1 button. (Highly simplified
The subform1 has a drop-down list box control
the command1 button open another form, form2, for filling out some detail (this is then placed in a table, table1
the drop-down list button show part of the info as filled out in form2 (from table1

However, after I filled out form2 and closed, the drop-down list box of form1 doesn't get update automatically with the new info

I tried searching the web, from what I understand, the requry should work

Private Sub Form_Activate(
On Error GoTo Form_Activate_Er

DoCmd.Maximiz

Me.tblLink.Requery 'tblLink is the name of the subfor

Form_Activate_Exit
Exit Su

Form_Activate_Err
MsgBox Error(
Resume Form_Activate_Exi

End Su

But this doesn't work, why?
 
A

Alex Dybenko

you can either use recacl
Me.tblLink.Recalc

or explicity requery combobox (drop-down)
Me.tblLink!mycombobox.Requery

--
Alex Dybenko (MVP)
http://Alex.Dybenko.com
http://www.PointLtd.com


augustus108 said:
hi all,

I got a form1, with a subform1, and a command1 button. (Highly simplified)
The subform1 has a drop-down list box control.
the command1 button open another form, form2, for filling out some detail
(this is then placed in a table, table1)
the drop-down list button show part of the info as filled out in form2 (from table1)

However, after I filled out form2 and closed, the drop-down list box of
form1 doesn't get update automatically with the new info.
 

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