Text Box Refresh from Combo Box

  • Thread starter Thread starter Jani
  • Start date Start date
J

Jani

Not able to figure out this simple thing. MS Access 2003. I have a combo box,
when selection is made, 2 unbound text boxes automatically fill in. Works -
no problem. However, when I move to a new or previous record, the text boxes
retain the information from the previous record and I want them to be blank.
How do I do this? Thanks in advance for your help... as always! Jani
 
Jani said:
Not able to figure out this simple thing. MS Access 2003. I have a combo
box,
when selection is made, 2 unbound text boxes automatically fill in.
Works -
no problem. However, when I move to a new or previous record, the text
boxes
retain the information from the previous record and I want them to be
blank.
How do I do this? Thanks in advance for your help... as always! Jani


I would guess that values are assigned to the text boxes in the AfterUpdate
event of the combo box. You can use code in the form's Current event to set
them to Null:

'------ start of example code ------
Private Sub Form_Current()

Me!txtFirstTextbox = Null
Me!txtSecondTextbox = Null

End Sub
'------ end of example code ------

Substitute the names of your text boxes in the above.
 
In the On Current event of the form put this code

TextBox1Name = ""
TextBox2Name = ""
 
I took the 1st suggestion and it works perfectly. Thanks to both of you for
the quick reply.
 
Back
Top