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

Subform problem

Status
Not open for further replies.

Hawkide

Technical User
Oct 8, 2003
159
US
I have a form with a subform on it. The RecordSource for the subform is a table.

The problem is as follows:

User selects a textbox on the subform and begins typing.
The first keystroke appears in the textbox and then the textbox loses focus.
The user must select the texbox again to continue typing.
This only occurs when the typing is creating a new record.

How do I prevent the textbox from losing focus when the new record is added? TIA...
 
Is there any OnChange event firing in the particular textbox?

Zameer Abdulla
JVBP MDS
Jack of Visual Basic Programming, Master in Dining & Sleeping
Visit Me
 
Thanks...the Form _Current event was set for the Subform.

I removed that and it is no behaving slightly differently. After I type the first character, that character beomes selected, Then When I type the next character it overwrites the first.

For example, if I type:

Hello

I will get ello

There are no other events for the subform or the textbox on the subform. Any ideas???
 
Please read this thread702-985234 It may give you a clue.
Or try replacing the TextBox with a new one.There is chance of corruption in control..
Regards

Zameer Abdulla
JVBP MDS
Jack of Visual Basic Programming, Master in Dining & Sleeping
Visit Me
 
The txb was not corrupt. I found a workaround.

In the GotFocus event for the textbox:

me.Selstart = 100

Thanks for the help...
 
That is a good idea....

Zameer Abdulla
JVBP MDS
Jack of Visual Basic Programming, Master in Dining & Sleeping
Visit Me
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top