Unhide Textbox when creating new record

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
 
W

Wayne Morgan

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
 

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