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

Print current record on a form

Status
Not open for further replies.

cys813

Technical User
Jun 19, 2008
14
US
I have a form which consist of a combo box and text boxes. text boxes are automatically filled in after a selection from the combo box.

My main goal was to let the user Print (using a command button) a current record. By current record i mean the data based on user's selection of the combo box.

I keep getting run time error or it says property not found. I've tried the followings.

1. DoCmd.RunCommand acCmdSelectRecord
DoCmd.PrintOut acSelection

2. DoCmd.PrintOut,1,1

3. stDocName = "frm_AFRS"
Set MyForm = Screen.ActiveForm
DoCmd.SelectObject acForm, stDocName, True
DoCmd.PrintOut
DoCmd.SelectObject acForm, MyForm.Name, False

here's what's going on. first line(1) prints fine the first time but when i select another record from the combo box and try to print, it says property found.
i think #2 was printing out every record.

any suggestions?

 
ignore this post. I unbounded the combo box and it's working fine now.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top