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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Invisible text

Status
Not open for further replies.

kabirpatel

Programmer
Nov 16, 2006
12
GB
Hi,

I have a form that is bound to a row in a SQL Server table. The form contains text boxes that are used to store values for each column in my row.

The form also has an "Add New" button which, when pressed clears all the text boxes so that users can populate the text boxes with values for a new record.

To do this I have added the following to the click event of the "Add New" button

DoCmd.RunCommand acCmdDataEntry

I want to default the initial values of 2 of the textboxes. To do this I add the following code:

Me.TextBox1.text = "Blah blah blah"

When a user presses the "Add New" button the textbox1 is populated with the relevant text but it is invisible. If I switch between the form and another application it becomes visible.

To get around this I have tried using Me.Repaint but it doesn't work.

Do you have any ideas about how this can be resolved?

Thanks
Kabir
 
i haven't tried it, but what about me.refresh? i suspect that would do the trick.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top