Combo values to clear when new record opened

C

CW

I have two combos that can be used to find a record and open the Order form -
one looks up the Ref and as an alternative the other looks up the Name.
Let's say I use Ref first and enter 8002 - order 8002 is opened, fine.
Then I want the order for Johnson so I enter that in the Name combo. The
Johnson form opens.
Trouble is, 8002 is still shown in the Ref combo field, which is no longer
the correct Ref.
And vice versa, if we use a Name search first and then use the Ref for the
next one, the out of date name remains in that combo.
How can I get these previous search criteria to clear when a new record is
called for or opened?
Many thanks
CW
 
J

Jeanette Cunningham

CW,
in the after update event of the combo that finds the record, put a line of
code to clear the other combo

In the name combo after update
Me.RefCombo = Null

In the ref combo after update
Me.NameCombo = Null

Jeanette Cunningham
 

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