refresh my list

D

Dave Smith

hi all,
i have a form which is a name lookup with a list box, i select a
name & open their details. i have a button which opens a blank form with
which to enter the new clients details when i'm finished & close that form
to go back to the name lookup list, the new record is not showing until name
lookup form is closed & reopened. i'd like it to refresh when the new record
is saved???

thanks in advance

dave
 
A

Allen Browne

Use the AfterUpdate event of the form where you entered the new value to
Requery the combo on the original form

Private Sub Form_AfterUpdate()
Forms![YourFirstFormNameHere]![YourComboNameHere].Requery
End Sub
 
A

Alex White MCDBA MCSE

Hi Dave,

on the form that is closing

after the closing method

e.g.

docmd.close acform, me.name

'reference the listbox on the original form's requery method

form_form1.Form..lstWhatever.Requery

should do what you want.
 
Top