J
John Ortt
I am trying to use a single form to display the data from a number of
queries.
I have now got this aspect working but I would like to change the title of
the form depending on the Query used for it's source data. I have a text
box at the top of the form entitled "Title".
I am trying to use the following line of code to change it but it doesn't
work, does anybody know how to make it work please.
Forms.VendorExpectedMarginsReport.Title.Text = "Cost Selling Report"
Thanks.
John.
P.S. The full section of code follows incase it is of any use.
________________________
Option Compare Database
Option Explicit
Dim stDocName As String
Dim stLinkCriteria As String
Function Open_VMForm()
stDocName = "VendorExpectedMarginsReport"
DoCmd.Openform stDocName, , , stLinkCriteria
End Function
Private Sub Button2_Click()
Open_VMForm
Forms.VendorExpectedMarginsReport.Title.Text = "Cost Selling Report"
Forms.VendorExpectedMarginsReport.RecordSource = "Select_Cost_Selling"
End Sub
queries.
I have now got this aspect working but I would like to change the title of
the form depending on the Query used for it's source data. I have a text
box at the top of the form entitled "Title".
I am trying to use the following line of code to change it but it doesn't
work, does anybody know how to make it work please.
Forms.VendorExpectedMarginsReport.Title.Text = "Cost Selling Report"
Thanks.
John.
P.S. The full section of code follows incase it is of any use.
________________________
Option Compare Database
Option Explicit
Dim stDocName As String
Dim stLinkCriteria As String
Function Open_VMForm()
stDocName = "VendorExpectedMarginsReport"
DoCmd.Openform stDocName, , , stLinkCriteria
End Function
Private Sub Button2_Click()
Open_VMForm
Forms.VendorExpectedMarginsReport.Title.Text = "Cost Selling Report"
Forms.VendorExpectedMarginsReport.RecordSource = "Select_Cost_Selling"
End Sub