Clearing field contents after update

D

DubboPete

Hi all,

I have a memo field which populates when a record from a subform is clicked.
The subform itself is populated when a combo-box selection (Combo1) is made.

Here's the drum:
We call John Smith on 21st June 2005 at 4.00pm
We record the time and date of the call in the database in the
ContactsHistory table, [contactdate],[contacttime]
We write a narrative of the conversation in the [Note] field of the
ContactsHistory table

all done thru a data-entry form...

Then, on inquisitive mode, the boss comes along and wants to see what
progress has been made.... so he opens up the Contact History form to play
catch up. This is what he does....

He selects "John Smith" (ID = 121) from Combo1 (where primary Key field ID
is a number, in table Contacts)
Subform then populates with date details of all contacts made to 121 (John
Smith) (linked by fields ID and CID from table ContactHistory)
He then clicks on a date entry (representing CID) on the subform, and Memo1
displays the narrative.

All of the above works as it should - naturally... LOL.

The reason for this request is when Boss then selects another person in
Combo1, the contents of the memo field are the only ones that are not
cleared. On clicking the new combo-box selection, it updates the subform
correctly, but Memo1 displays the last entry from the previous ID.

How do I get Memo1 to clear itself too, when I re-select from Combo1?
Simple really huh?

thanks for your help guys...

DubboPete
the List's only 17th Century Goat Herder
 
M

Marshall Barton

DubboPete said:
I have a memo field which populates when a record from a subform is clicked.
The subform itself is populated when a combo-box selection (Combo1) is made.

Here's the drum:
We call John Smith on 21st June 2005 at 4.00pm
We record the time and date of the call in the database in the
ContactsHistory table, [contactdate],[contacttime]
We write a narrative of the conversation in the [Note] field of the
ContactsHistory table

all done thru a data-entry form...

Then, on inquisitive mode, the boss comes along and wants to see what
progress has been made.... so he opens up the Contact History form to play
catch up. This is what he does....

He selects "John Smith" (ID = 121) from Combo1 (where primary Key field ID
is a number, in table Contacts)
Subform then populates with date details of all contacts made to 121 (John
Smith) (linked by fields ID and CID from table ContactHistory)
He then clicks on a date entry (representing CID) on the subform, and Memo1
displays the narrative.

All of the above works as it should - naturally... LOL.

The reason for this request is when Boss then selects another person in
Combo1, the contents of the memo field are the only ones that are not
cleared. On clicking the new combo-box selection, it updates the subform
correctly, but Memo1 displays the last entry from the previous ID.

How do I get Memo1 to clear itself too, when I re-select from Combo1?
Simple really huh?


You didn't say how the Notes text box is filled in, but
you're probably using code in the subform's Click event to
set the text box. If that's close, then I think all you
need to do is use the combo box's AfterUpdate event to set
the text box to Null. E.g.
Me.subform.Form.Notes = Null
 

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