I am trying to show results in a list box as per the selection in the list box.
for example:
List Box 1:
Current Stock
Received Stock
Transferred Stock
List Box 2:
List box 2 should have to show results as per the selection.
I have attached the screenshots.
How to get the solution.
The problem is dynamiclist rowsource is not working if i am trying as under
"Select * from MasterTables where MasterTablesPK=4;"
kindly suggest the solution.
for example:
List Box 1:
Current Stock
Received Stock
Transferred Stock
List Box 2:
List box 2 should have to show results as per the selection.
I have attached the screenshots.
How to get the solution.
Code:
Private Sub btnInventoryManagement_Click()
Me.DynamicList.RowSource = "Select * from MasterTables where MasterTablesPK>3;"
Me.DynamicList.ColumnCount = 3
Me.DynamicList.ColumnHeads = False
Me.DynamicList.ColumnWidths = "0;3.1042cm;0"
End Sub
Private Sub DynamicList_Click()
If Me.DynamicList.RowSource = "Select * from MasterTables where MasterTablesPK>3;" Then
Me.DynamicList1.RowSource = "SELECT ItemsPK, ItemsListName, CurrentStock, Nz([Opening Balance],0) AS Opening, Nz([NetPurchases],0) AS Purchases, Nz([NetTransfers],0) AS Transfers, Nz([MonthlyAdjustments],0) AS Adjustments, Round(Nz([NetTransfers],0)/Day(Date())*-1,2) AS AvgUsage FROM qryStockSummary;"
Me.DynamicList1.ColumnCount = 8
Me.DynamicList1.ColumnHeads = True
Me.DynamicList1.ColumnWidths = "0;8cm;3cm;3cm;3cm;3cm;3cm;3cm"
End If
End Sub
The problem is dynamiclist rowsource is not working if i am trying as under
"Select * from MasterTables where MasterTablesPK=4;"
kindly suggest the solution.