A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Combo values to clear when new record opened



 
 
Thread Tools Display Modes
  #1  
Old April 13th, 2008, 12:25 AM posted to microsoft.public.access.forms
CW
external usenet poster
 
Posts: 701
Default Combo values to clear when new record opened

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
  #2  
Old April 13th, 2008, 01:23 AM posted to microsoft.public.access.forms
Jeanette Cunningham
external usenet poster
 
Posts: 2,190
Default Combo values to clear when new record opened

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


"CW" wrote in message
...
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



  #3  
Old April 19th, 2008, 09:55 PM posted to microsoft.public.access.forms
CW
external usenet poster
 
Posts: 701
Default Combo values to clear when new record opened

Perfect - thanks Jeanette! Sorry for late acknowledgement, been away...
CW

"Jeanette Cunningham" wrote:

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


"CW" wrote in message
...
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




 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 09:19 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.