Unhide Textbox when creating new record

  • Thread starter Thread starter Tom
  • Start date Start date
T

Tom

I need to create an event that allows me to do the
following:

- When open up form, TEXTBOX is hidden
- When click on command button (linked to function "create
new record"), the TEXTBOX then will be "unhidden" for data
entry.

Any ideas as to how I should do this?

Thanks,
Tom
 
Set the default for the textbox's visible property to No in the Properties sheet. In the
Form's OnCurrent event:

If Me.NewRecord = True Then
Me.txtMyTextbox.Visible = True
Else
Me.txtMyTextbox.Visible = False
End If

If you prefer, the above If statement could be shortened to

Me.txtMyTextbox.Visible = Me.NewRecord
 
Back
Top