I am building an application that will keep track of vehicles that have been repaired at a automobile repair shop. When I attempt to create a new repair order, I get the following error message:
Run-time error '3101':
The Microsoft Office Access database engine cannot find a record in the table 'tblVehicles' with key matching field(s) 'VehicleID'.
this is whether it is a repair order of a vehicle that has already been in the shop for repair, or a new vehicle that has not been repaired before.
Here is the SQL from the form (frmRepairOrder-Select4Report2)that calls the repair order form :
SELECT tblJobs.CustomerID, tblMasterCustomer.LastName, tblMasterCustomer.FirstName, tblJobs.JobID, tblJobs.VehicleID, tblVehicles.ModYear, tblVehicles.MakeID, tblMakes.Make, tblVehicles.ModelID, tblModels.Model, tblJobs.RepairDateIn
FROM tblModels INNER JOIN (tblMakes INNER JOIN (tblMasterCustomer INNER JOIN (tblVehicles INNER JOIN tblJobs ON tblVehicles.VehicleID = tblJobs.VehicleID) ON tblMasterCustomer.CustomerID = tblJobs.CustomerID) ON tblMakes.MakeID = tblVehicles.MakeID) ON tblModels.ModelID = tblVehicles.ModelID
ORDER BY tblMasterCustomer.LastName, tblMasterCustomer.FirstName;
and here is the SQL from the repair order form (frmJob):
SELECT tblJobs.JobID, tblJobs.CustomerID, tblJobs.VehicleID, tblMasterCustomer.FirstName, tblMasterCustomer.LastName, [FirstName] & " " & [LastName] AS FullName, tblMasterCustomer.StreetAddressLine1, tblMasterCustomer.StreetAddressLine2, tblMasterCustomer.City, tblMasterCustomer.State, tblMasterCustomer.ZipCode, [City] & ", " & [State] & " " & [ZipCode] AS [City-State-Zip], tblMasterCustomer.HomePhone, tblMasterCustomer.BusinessPhone, tblMasterCustomer.MobilePhone, tblMasterCustomer.EmailAddress, tblJobs.JobTypeID, tblJobs.RepairDateIn, tblJobs.RepairDateOut, tblJobs.WarrantyWorkPerformed, tblJobs.DateOfWarrantyWork, tblJobs.DescribeWarrantyWork, tblJobs.RepairMilageIn, tblJobs.RepairMileageOut, tblJobs.EmployeeID, tblJobs.PaymentMethod, tblJobs.Last5Digits, tblJobs.MiscellaneousCost
FROM tblMasterCustomer INNER JOIN (tblVehicles INNER JOIN tblJobs ON tblVehicles.VehicleID = tblJobs.VehicleID) ON tblMasterCustomer.CustomerID = tblJobs.CustomerID;
Thank you in advance for your assistance.
r/David
Selasa, 27 September 2011
[MS_AccessPros] Record not being found by Access in table
__._,_.___
MARKETPLACE
.
__,_._,___
Langganan:
Posting Komentar (Atom)
Tidak ada komentar:
Posting Komentar