May 30, 2008 #1 Jahappz Technical User Jun 3, 2002 133 SE Hello! I have a report that i want to have the "title" to be according to a field in a form that i have. eg. enter "TEST" in the form and the "title - caption" should be "TEST" in the report. is this possible?
Hello! I have a report that i want to have the "title" to be according to a field in a form that i have. eg. enter "TEST" in the form and the "title - caption" should be "TEST" in the report. is this possible?
May 30, 2008 #2 Remou Technical User Sep 30, 2002 13,030 BE You can set the title in the form's open event: Code: Private Sub Report_Open(Cancel As Integer) Me.lblTitle.Caption = Forms!frmF!txtName End Sub Or you can use a textbox and refer to the form in the Control Source: = Forms!frmF!txtName Upvote 0 Downvote
You can set the title in the form's open event: Code: Private Sub Report_Open(Cancel As Integer) Me.lblTitle.Caption = Forms!frmF!txtName End Sub Or you can use a textbox and refer to the form in the Control Source: = Forms!frmF!txtName
May 30, 2008 Thread starter #3 Jahappz Technical User Jun 3, 2002 133 SE Ms VB complains about the ".lblTitle" when running the report any idéas? Upvote 0 Downvote
May 30, 2008 #4 Remou Technical User Sep 30, 2002 13,030 BE Yes, change lblTitle and the name of the form to the names that you have used. Upvote 0 Downvote
May 30, 2008 Thread starter #5 Jahappz Technical User Jun 3, 2002 133 SE Private Sub Report_Open(Cancel As Integer) Me.Caption = Forms!frmF!txtName End Sub Worked for me! Big thanks! Upvote 0 Downvote
Private Sub Report_Open(Cancel As Integer) Me.Caption = Forms!frmF!txtName End Sub Worked for me! Big thanks!