Jun 24, 2003 #1 uhu IS-IT--Management May 21, 2003 40 NZ Hi everyone, How can I set a value of a textbox in a report from a form using VBA ? Can anyone give me an example ? The label in the report is : Text1 Report Name : SalesReport cheers, vito
Hi everyone, How can I set a value of a textbox in a report from a form using VBA ? Can anyone give me an example ? The label in the report is : Text1 Report Name : SalesReport cheers, vito
Jun 24, 2003 #2 BillPower Programmer Nov 28, 2002 1,434 GB Hi uhu, Paste this into the declarations section of a Module: Global gReportTextValue As String Use this as your code to open the report: gReportTextValue = "uhu " DoCmd.OpenReport "SalesReport", acViewPreview Paste this into the On Open event of your Report: Me!Text1 = gReportTextValue Bill Upvote 0 Downvote
Hi uhu, Paste this into the declarations section of a Module: Global gReportTextValue As String Use this as your code to open the report: gReportTextValue = "uhu " DoCmd.OpenReport "SalesReport", acViewPreview Paste this into the On Open event of your Report: Me!Text1 = gReportTextValue Bill
Jun 24, 2003 Thread starter #3 uhu IS-IT--Management May 21, 2003 40 NZ Hi Bill, Thanks for your reply. I tried this on my report, and it still produces error. Private Sub PageHeaderSection_Format(Cancel As Integer, FormatCount As Integer) Me!Text1 = "vito" End Sub cheers vito Upvote 0 Downvote
Hi Bill, Thanks for your reply. I tried this on my report, and it still produces error. Private Sub PageHeaderSection_Format(Cancel As Integer, FormatCount As Integer) Me!Text1 = "vito" End Sub cheers vito
Jun 24, 2003 #4 BillPower Programmer Nov 28, 2002 1,434 GB Hi uhu, I did say try using this in the On Open event of your Report. From your very brief questions I'm not exactly sure what you're tryin to do. Bill Upvote 0 Downvote
Hi uhu, I did say try using this in the On Open event of your Report. From your very brief questions I'm not exactly sure what you're tryin to do. Bill
Jun 24, 2003 Thread starter #5 uhu IS-IT--Management May 21, 2003 40 NZ Thanks bill, it works now, just forgot to include .Value when inputting "vito" Upvote 0 Downvote