By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,504 Members | 1,190 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,504 IT Pros & Developers. It's quick & easy.

Forcing Cursor To Specific Record/Field On Continuous Screen?

P: n/a
I've got a screen that has a subform containing an indeterminate number of
records.

When the user clicks "Change", I put the screen into Edit mode by unlocking all
the subform's fields, setting the subform's.AllowEdits = True, .AllowDeletions =
True, and .AllowAdditions = True.

At this point, all the records are showing plus that empty record that becomes
visible when .AllowAdditions=True.

What I'd like to do is force the cursor to the first field in that empty record.

Anybody been here?
--
PeteCresswell
Dec 18 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
(PeteCresswell) wrote in message
<vm********************************@4ax.com> :
I've got a screen that has a subform containing an indeterminate number of
records.

When the user clicks "Change", I put the screen into Edit mode by unlocking
all the subform's fields, setting the subform's.AllowEdits = True,
.AllowDeletions = True, and .AllowAdditions = True.

At this point, all the records are showing plus that empty record that
becomes visible when .AllowAdditions=True.

What I'd like to do is force the cursor to the first field in that empty
record.

Anybody been here?


I think you should be able to combine .SetFocus and gotorecord, perhaps
something like

docmd.gotorecord,,acnewrec
me.controls("txtTheFirstControl").setfocus

--
Roy-Vidar

Dec 18 '05 #2

P: n/a
Per RoyVidar:
I think you should be able to combine .SetFocus and gotorecord, perhaps
something like

docmd.gotorecord,,acnewrec
me.controls("txtTheFirstControl").setfocus


Bingo!
----------------------------------------------
4053 With Me.subTasks
4054 .SetFocus
4055 !txtBeginHoursMinutes.SetFocus
4056 End With
4059 DoCmd.GoToRecord , , acNewRec
----------------------------------------------

Thanks! I had never even heard of .GoToRecord...
--
PeteCresswell
Dec 21 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.