Hi im new here and i have a problem. I have a form "MainForm" which have 3 buttons (MasterListBtn, TransactionBtn, HistoryBtn) and a subform/Subreport (SubFormMain). For MasterListBtn, SourceObject is "MasterlListForm". For TransactionBtn, sourceObject is "TransactionForm" and For HistoryBtn, sourceObject is "HistoryForm". Upto here it is fine, working good, Now In SearchForm i have These Controls (ItemNameCb, ItemSNoTb and SearchBtn).
I want to generate a Report based on ItemNameCb, and ItemSNoTb values and i want to open that Report in SubForm by Changing SourceObject = "Report.HistoryReport"
Private Sub SearchBtn_Click()
[Forms]!MainForm]![SubFormMain].[SourceObject] = "Report.HistoryReport"
End Sub
OnLoad Event of HistoryReport
Private Sub HistoryReport_Load()
[Forms]![MainForm]![SubFormMain].[Form].RecordSource= "Select * from TransactionTable Where ItemName = ' " & [Forms]![MainForm]![SubFormMain].[Form]![ItemNameCb] & " ' and ItemSNo = ' " & [Forms]![MainForm]![SubFormMain].[Form]![ItemSNoTb] & " ' "
End Sub
I tried a lot Report opens in SubFormMain but the report Shows nothing
Any Help?
I want to generate a Report based on ItemNameCb, and ItemSNoTb values and i want to open that Report in SubForm by Changing SourceObject = "Report.HistoryReport"
Private Sub SearchBtn_Click()
[Forms]!MainForm]![SubFormMain].[SourceObject] = "Report.HistoryReport"
End Sub
OnLoad Event of HistoryReport
Private Sub HistoryReport_Load()
[Forms]![MainForm]![SubFormMain].[Form].RecordSource= "Select * from TransactionTable Where ItemName = ' " & [Forms]![MainForm]![SubFormMain].[Form]![ItemNameCb] & " ' and ItemSNo = ' " & [Forms]![MainForm]![SubFormMain].[Form]![ItemSNoTb] & " ' "
End Sub
I tried a lot Report opens in SubFormMain but the report Shows nothing
Any Help?
Last edited: