Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Clearing a value from a textbox

Status
Not open for further replies.

darkmage1

Technical User
Jan 30, 2005
28
US
I have a form that has a textbox names text42. If the correct value is entered into the box a tab page will appear. What I would like to do is when I am done with a record I would like the text42 field value to automatically clear when I advance to the next record.

Here is the code to get the tab page to appear. right now When the tab page is visible, the tab page stays visible for all records. I am using the OnCurrent Event with this code.

If Me!Text42 = 542865700 Then
Me.Page37.Visible = True
Else
Me.Page37.Visible = False
End If
 
How are ya darkmage1 . . .

In design view why not simply set the [blue]Default Value[/blue] property of [blue]Text42[/blue] to Null or an empty string ""

Calvin.gif
See Ya! . . . . . .

Be sure to see FAQ219-2884:
 

At the point where you want the text box to be cleared, just add Me.Text42 = "". However, don't forget that, if this is a bound control, that value will be changed in your table.


Randy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top