crossy5575
Registered User.
- Local time
- Today, 19:19
- Joined
- Apr 21, 2015
- Messages
- 46
Hi there,
I have a simple query, which filters a long list of data into criteria based on the tab label in the form.
the sql is as follows:
SELECT tblproductdb.PC_Code AS Code, tblproductdb.PC_Page AS Page, tblproductdb.PC_desc AS [Desc], tblproductdb.size AS [Size], tblproductdb.grouping_code, tblorderprodsdetail.purchasequantity AS Quantity, tblorderprodsdetail.purchasedelivered, tblproductgroup.Purchasepr AS Price, tblproductgroup.[2ndgrouping], [purchasepr]*[purchasequantity] AS Total
FROM tblproductgroup INNER JOIN (tblproductdb LEFT JOIN tblorderprodsdetail ON tblproductdb.[PC_Code] = tblorderprodsdetail.[purchaseitem]) ON tblproductgroup.grouping_code = tblproductdb.grouping_code
WHERE (((tblproductgroup.[2ndgrouping])=[text179].[value]));
where [text179].[value] is a textbox with a number in it which highlights the tab number and thus filter the data.
the only problem is when i load the form (or run the query) it asks for a parameter value.
is there a way to set a default value if text179 is null, or on load value =1?
thanks
Simon
I have a simple query, which filters a long list of data into criteria based on the tab label in the form.
the sql is as follows:
SELECT tblproductdb.PC_Code AS Code, tblproductdb.PC_Page AS Page, tblproductdb.PC_desc AS [Desc], tblproductdb.size AS [Size], tblproductdb.grouping_code, tblorderprodsdetail.purchasequantity AS Quantity, tblorderprodsdetail.purchasedelivered, tblproductgroup.Purchasepr AS Price, tblproductgroup.[2ndgrouping], [purchasepr]*[purchasequantity] AS Total
FROM tblproductgroup INNER JOIN (tblproductdb LEFT JOIN tblorderprodsdetail ON tblproductdb.[PC_Code] = tblorderprodsdetail.[purchaseitem]) ON tblproductgroup.grouping_code = tblproductdb.grouping_code
WHERE (((tblproductgroup.[2ndgrouping])=[text179].[value]));
where [text179].[value] is a textbox with a number in it which highlights the tab number and thus filter the data.
the only problem is when i load the form (or run the query) it asks for a parameter value.
is there a way to set a default value if text179 is null, or on load value =1?
thanks
Simon