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

Tab/Move into subform

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
How can I move into a subform using the tab order facility?

Also how can I move into a subform using the setfocus. I have used setfocus to move from search field to the first field needing updating but can't get it to go into my subform. Why?
 
you have to set focus to the subform first

here is some code I use all the time, you may not need all of it...

'add record to sub form
Me![Yoursubform].SetFocus
DoCmd.GoToRecord , , acNewRec

'assign a value to a field in that sub form
Me![Yoursubform].Form![DrawingNumber] = ActiveXCtl1.FileName

'save the record
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70

' Requery the sub form
Me![Yoursubform].Requery



DougP, MCP

Visit my WEB site to see how Bar-codes can help you be more productive
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top