since i have multiple items with unique IDs,like 'B001' FOR COCA-COLA, 'F001' FOR Fanta and so on, i would like When i select an item e.g 'B001' the name should also appear in some field after pressing run instead of only totals so that i can have 'fanta opening stock'or 'coca-cola opening stock' based on my input. the folloing is my current SQL query.
Expand|Select|Wrap|Line Numbers
- SELECT Count(*) AS [NUMBER OF PURCHASES], Sum([UNITS PURCHASED]) AS [OPENING STOCK]
- FROM PURCHASES
- WHERE (((PURCHASES.[Item ID]) Like [ENTER ITEM CODE:] & "*") AND ((PURCHASES.[Date Purchased]) Like [ENTER DATE OF PURCHASE:] & "*"));