Hi
I have a continuous sub form with a text box. I need to put a value into this text box. once the value is inthe txt box the form adds that record and displays a new txtbox below the original for new data.
How do I move focus or address this new txtbox????
I have no problems getting to the first text box, it's getting to the new one that is the problem.
ps all this is being done from a seperate form.
heres a little code
note all the sendkey stuff is to TAB me to then next txtbox... it may be working but my set focus is dropping me back to my startting place
btw the focus stays on my (record line) even if there are 4 records showing in the sub form ... I cant get it to jump to the next record..
Set rs = Me.Recordset
rs.MoveFirst
While Not rs.EOF
Forms!frm_training_matrix![qry_training_details_sub subform]!txt_TrainingType = rs!TrainingType
Forms!frm_training_matrix![qry_training_details_sub subform]!txt_TrainingType.SetFocus
SendKeys "{tab}", True
SendKeys "{tab}", True
SendKeys "{tab}", True
SendKeys "{tab}", True
SendKeys "{tab}", True
SendKeys "{tab}", True
SendKeys "{tab}", True
SendKeys "{tab}", True
SendKeys "{tab}", True
rs.MoveNext
Wend
TIA
Jeff
I have a continuous sub form with a text box. I need to put a value into this text box. once the value is inthe txt box the form adds that record and displays a new txtbox below the original for new data.
How do I move focus or address this new txtbox????
I have no problems getting to the first text box, it's getting to the new one that is the problem.
ps all this is being done from a seperate form.
heres a little code
note all the sendkey stuff is to TAB me to then next txtbox... it may be working but my set focus is dropping me back to my startting place
btw the focus stays on my (record line) even if there are 4 records showing in the sub form ... I cant get it to jump to the next record..
Set rs = Me.Recordset
rs.MoveFirst
While Not rs.EOF
Forms!frm_training_matrix![qry_training_details_sub subform]!txt_TrainingType = rs!TrainingType
Forms!frm_training_matrix![qry_training_details_sub subform]!txt_TrainingType.SetFocus
SendKeys "{tab}", True
SendKeys "{tab}", True
SendKeys "{tab}", True
SendKeys "{tab}", True
SendKeys "{tab}", True
SendKeys "{tab}", True
SendKeys "{tab}", True
SendKeys "{tab}", True
SendKeys "{tab}", True
rs.MoveNext
Wend
TIA
Jeff