View Full Version : Requery from a pop up form?


Dachande11
09-26-2001, 06:06 AM
Hi,

I have a pop up form which contains a list box. When I click on the list box it populates a text box on the main form and sets other boxes to "". My problem is that i cannot get the controls on the list box to requery the text box each time I select a different record from the list.

Here is the code which I use in my list box

Private Sub AllRef_Click()
[Forms]![productod]![RefSearch] = Me![AllRef]
[Forms]![productod]![client] = ""
[Forms]![productod]![Part] = ""
[Forms]![productod]![Accounts] = ""
[Forms]![productod]![AccProd] = ""
[Forms]![productod]![Acc] = ""

[Forms]![productod]![Part].Requery
[Forms]![productod]![Acc].Requery
[Forms]![productod]![AccProd].Requery
[Forms]![productod]![RefSearch].Requery

[Forms]![productod]![RefSearch].SetFocus

If anybody can help I would be most grateful

Thanks

Rich
09-26-2001, 10:48 AM
Why are you setting all the other fields to null from the list box?

Dachande11
09-26-2001, 11:10 PM
Because I would like them to be null and then populated by information when everything has requeried. If there is nothing to find I want the fields empty rather than populated by the previous selection.