General discussion

Locked

MS Access 97 (AutoTab Feature)

By parier ·
I have a DB that has a stand alone form that will print to a report, only when the form is open using unbound fields. Problem is if the user(s) do not tab out of the last field, it will not print and this field is used more than once. My question is how can I add to the macro I have ON Print that I need it to tab to the next field or out of their last field before printing. Like I said I worls great as long as they tab out of the last field they enter data to, but if they forget, it will notprint only the last field or the field they are in. So basically I only need a macro (or something) to do a single tab and I can add that to my already existing macro that prints everything.


Thank you.

This conversation is currently closed to new comments.

5 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

MS Access 97 (AutoTab Feature)

by roc180 In reply to MS Access 97 (AutoTab Fea ...

Use the setFocus property of a control to move the focus from your last field to a more desirable location. Or if you really want to send a TAB key press, use the SendKeys function. Example:

Private Sub CmdPrint_Click()
TxtField1.SetFocus 'Moves Focus(just like TAB)
Call MyMacro
End Sub

Good Luck

Neal Martinelli

Collapse -

MS Access 97 (AutoTab Feature)

by parier In reply to MS Access 97 (AutoTab Fea ...

Works great - Thanks!

Collapse -

MS Access 97 (AutoTab Feature)

by donq In reply to MS Access 97 (AutoTab Fea ...

Late again - Roc180's answer is what you need, you might add his suggested SetFocus line to the click event of the control that runs the report just before anything else happens.

Collapse -

MS Access 97 (AutoTab Feature)

by parier In reply to MS Access 97 (AutoTab Fea ...

Poster rated this answer

Collapse -

MS Access 97 (AutoTab Feature)

by parier In reply to MS Access 97 (AutoTab Fea ...

This question was closed by the author

Back to Windows Forum
5 total posts (Page 1 of 1)  

Related Discussions

Related Forums