Requery from a pop up form?

Dachande11

Registered User.
Local time
Today, 13:49
Joined
May 1, 2001
Messages
41
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
 
Why are you setting all the other fields to null from the list box?
 
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.
 

Users who are viewing this thread

Back
Top Bottom