Solved

Form is asking for a parameter value

Posted on 2011-09-12
12
327 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 2
  • 2
  • +1
12 Comments
 
LVL 77

Expert Comment

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

Author Comment

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

Author Comment

by:yddadsjd95
ID: 36523138
Should I be using another link field?
0
Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

 
LVL 31

Expert Comment

by:Helen_Feddema
ID: 36523173
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
ID: 36523183
Removing tblVehicles from the main form's record source eliminated the parameter message about CustomerID.  
0
 

Author Comment

by:yddadsjd95
ID: 36523754
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
 
LVL 77

Assisted Solution

by:peter57r
peter57r earned 250 total points
ID: 36523944
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
ID: 36524521
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
ID: 36527146
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
ID: 36528444
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
ID: 36528551
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
ID: 36528582
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

730 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