Ulsterman2
Programmer
The following query makes a table called "tbl Invoices". The query prompts for the values for "From", "To" and "Threshold". The problem is that when the table is created, the field type for these 3 fields is set as "Binary", which means I can't do any calculations in subsequent queries using these fields. I would like them to be number fields. Any help would be greatly appreciated.
SELECT [tbl Data].ID, [tbl Data].Period, [tbl Data].Type, [tbl Data].Gross, Rnd([Int Ref]) AS Random, [tbl Data].[MUS Ref], [From Period] AS [From], [To Period] AS [To], [HV Threshold] AS Threshold INTO [tbl Invoices]
FROM [tbl Data]
WHERE ((([tbl Data].Period) Between [From Period] And [To Period]) AND (([tbl Data].Type)="AI" Or ([tbl Data].Type)="CRI" Or ([tbl Data].Type)="IC"))
ORDER BY [tbl Data].ID, Rnd([Int Ref]) DESC;
SELECT [tbl Data].ID, [tbl Data].Period, [tbl Data].Type, [tbl Data].Gross, Rnd([Int Ref]) AS Random, [tbl Data].[MUS Ref], [From Period] AS [From], [To Period] AS [To], [HV Threshold] AS Threshold INTO [tbl Invoices]
FROM [tbl Data]
WHERE ((([tbl Data].Period) Between [From Period] And [To Period]) AND (([tbl Data].Type)="AI" Or ([tbl Data].Type)="CRI" Or ([tbl Data].Type)="IC"))
ORDER BY [tbl Data].ID, Rnd([Int Ref]) DESC;