L
Lincoln Beachy
The query is called client query. This query has two tables in it, they
are Clients, and Vehicles tables.
The Client table has
ClientID - primary Key
Entry FeeID
FirstName
LastName
Address
City
State
PostalCode
Home Phone
Cell Phone
Fax
Email address
The Vehicle Table Has:
Vehicle ID - primary key
Client Id
Vin
year
make
Model
Units
policy number
From
To
Cancelled
Days
here is the SQL view:
SELECT [FirstName] & " " & [LastName] AS [Full Name], Vehicles.Year,
Vehicles.Make, Vehicles.Model, Vehicles.From, Vehicles.To, [To]-[From]
AS Days, Vehicles.Units, [Units]*[Days]/365 AS Equals, 164.18 AS Rate,
[Equals]*[Rate] AS Premium, IIf(([UNITS]=1 And [MODEL]="Trailer"),5000)
AS Trailer,
IIf([Units]>3.5,"35000",IIf([Units]>3,"26000",IIf([Units]>2.5,"18000",IIf([Units]>2,"11000",IIf([Units]>1,"5000",0)))))
AS [Coverage Level], ([Trailer]+[Coverage Level]) AS Total
FROM Clients INNER JOIN Vehicles ON Clients.[Client ID] =
Vehicles.[Client ID];
I add the Total field to get total cost of each person's vehicle on the
report. But I did not work the report yet.
I hope this helps you u guys.
Lincoln Beachy
are Clients, and Vehicles tables.
The Client table has
ClientID - primary Key
Entry FeeID
FirstName
LastName
Address
City
State
PostalCode
Home Phone
Cell Phone
Fax
Email address
The Vehicle Table Has:
Vehicle ID - primary key
Client Id
Vin
year
make
Model
Units
policy number
From
To
Cancelled
Days
here is the SQL view:
SELECT [FirstName] & " " & [LastName] AS [Full Name], Vehicles.Year,
Vehicles.Make, Vehicles.Model, Vehicles.From, Vehicles.To, [To]-[From]
AS Days, Vehicles.Units, [Units]*[Days]/365 AS Equals, 164.18 AS Rate,
[Equals]*[Rate] AS Premium, IIf(([UNITS]=1 And [MODEL]="Trailer"),5000)
AS Trailer,
IIf([Units]>3.5,"35000",IIf([Units]>3,"26000",IIf([Units]>2.5,"18000",IIf([Units]>2,"11000",IIf([Units]>1,"5000",0)))))
AS [Coverage Level], ([Trailer]+[Coverage Level]) AS Total
FROM Clients INNER JOIN Vehicles ON Clients.[Client ID] =
Vehicles.[Client ID];
I add the Total field to get total cost of each person's vehicle on the
report. But I did not work the report yet.
I hope this helps you u guys.
Lincoln Beachy