Solved

Form is asking for a parameter value

Posted on 2011-09-12
12
323 Views
Last Modified: 2013-11-27
Great Day, I am trying to create an estimate for a customer that is having repair work done to his/her vehicle. When I click the customer's vehicle which the estimate is for, Access is requesting a parameter value for CustomerID. I know this sounds like a broken record from programmers of my skill level, but I've looked at every query and field name on the forms, but have been unable to discover why there is a CustomerID that does not have a value.

I have enclosed a copy of the db with the following instructions:

Click on frmCustomerContactData
highlight vehicle to be serviced
click "Repair Order" button

Thanks in advance for your assistance.

r/David
IndependentAuto---EE---9-12-11.zip
0
Comment
Question by:yddadsjd95
  • 6
  • 2
  • 2
  • +1
12 Comments
 
LVL 77

Expert Comment

by:peter57r
Comment Utility
You are using CustomerID as the link field from your main form to (at least one) subform.
0
 

Author Comment

by:yddadsjd95
Comment Utility
Thank you Peter57r, Shouldn't that CustomerID already have a value in it?
0
 

Author Comment

by:yddadsjd95
Comment Utility
Should I be using another link field?
0
 
LVL 31

Expert Comment

by:Helen_Feddema
Comment Utility
I see two problems:  tblVehicles is in the record source of the main form; remove it.  It isn't needed there, just for the linked subform.  Then, in the code running from the Print Repair Order button, one field in the subform is referenced as VehicleMakeID, when it is actually MakeID.  Also, the form in question doesn't exist (I presume that is because this database is still in development).
0
 
LVL 31

Expert Comment

by:Helen_Feddema
Comment Utility
Removing tblVehicles from the main form's record source eliminated the parameter message about CustomerID.  
0
 

Author Comment

by:yddadsjd95
Comment Utility
Thank you Helen, but I am still getting the same error, even after removing tblVehicles from the main form's record source. Shouldn't CustomerID already have a value in it?
0
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 
LVL 77

Assisted Solution

by:peter57r
peter57r earned 250 total points
Comment Utility
You don't have a field called Customerid in your main form. You have changed it in your query to give it a' table_ ' prefix.
0
 

Author Comment

by:yddadsjd95
Comment Utility
Thanks Peter57r, I removed the table prefix and it now is CustomerID but I am still getting the same error. Here is the SQL:

SELECT tblJobs.JobID, tblJobs.CustomerID, tblJobs.VehicleID, 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 tblJobs;

But what is strange is that when I run the query from design view, it runs with no problem.


r/David
0
 

Author Comment

by:yddadsjd95
Comment Utility
Oops, I neglected to compile the file I loaded. Here is the corrected version.

thanks,

David
IndependentAuto---EE---9-12-11--.zip
0
 
LVL 61

Accepted Solution

by:
mbizup earned 250 total points
Comment Utility
In the code behind the command button used to open the Repair Order form, change the open form statement to:

                DoCmd.OpenForm "frmJob", , , WhereCondition:="CustomerID = " & Forms!frmCustomerContactData!txtCustomerID


(Drop the prefix on CustomerID)
0
 

Author Closing Comment

by:yddadsjd95
Comment Utility
Thank you mbizup, Peter57r told me of the prefix issue, but I looked in the wrong place for it.

Thanks to everyone the request for  parameter value has been eliminated, but I am still not receiving the expected results. with the 'WhereCondition' I was expecting the new estimate to fill with the customer's contact and vehicle information, which I will ask in about in another question.

Have a great day today and an even greater one tomorrow!

r/David
0
 
LVL 61

Expert Comment

by:mbizup
Comment Utility
David,

As an aside, are these real people's names, phone numbers, etc in your customers table?  If so, you may want to hit the Request Attention button and ask the Mods to help you get these uploads 'sanitized' to protect their privacy.
0

Featured Post

Complete Microsoft Windows PC® & Mac Backup

Backup and recovery solutions to protect all your PCs & Mac– on-premises or in remote locations. Acronis backs up entire PC or Mac with patented reliable disk imaging technology and you will be able to restore workstations to a new, dissimilar hardware in minutes.

Join & Write a Comment

In Debugging – Part 1, you learned the basics of the debugging process. You learned how to avoid bugs, as well as how to utilize the Immediate window in the debugging process. This article takes things to the next level by showing you how you can us…
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now