Refresh

M

mark

I have a a list box that getting its data from a table.

The list box is called LB
the Table is called table1 and has only one filed called Field1

What event and what code should be in the event for the list box to be
refreshed with the data from table1 Field1 each time I a, pressing a button
(let's say Button1)

Many thanks
Mark
 
P

Pieter Wijnen

Depends on how you populate the Listbox...
If You bind it to Table/query & use Rowsource=Table1
then:
Sub Command1_click()
Me!Lb.Requery
End Sub

should do it

HTH

Pieter
 
M

mark

Thanks,
Mark

Pieter Wijnen said:
Depends on how you populate the Listbox...
If You bind it to Table/query & use Rowsource=Table1
then:
Sub Command1_click()
Me!Lb.Requery
End Sub

should do it

HTH

Pieter
 
D

dtoney

Will this blank the list box for the next record? My problem is that when I
need to add a new record, the previous entries are still there.
 
Top