Connecting Tech Pros Worldwide Forums | Help | Site Map

Parameter value question

Newbie
 
Join Date: Nov 2006
Posts: 2
#1: Nov 14 '06
Hi

I have a subform that shows dates and comments for a person.
But when I open the main form I get this Parameter value box to insert a specific date or just press OK and the query will work anyway.
How do I get rid of the parameter value box?
I would rather have a combo box where you can choose a date to backtrack comments.

Mikael

NeoPa's Avatar
Administrator
 
Join Date: Oct 2006
Location: London - UK
Posts: 15,722
#2: Nov 14 '06

re: Parameter value question


Please see this thread for instructions on starting a thread which experts will find easier to answer (POSTING GUIDELINES: Please read carefully before posting to a forum ).

However, I will do what I can with the info available.
If you have a parameter value box popping up, that is because in the Record Source for your form (or subform, whichever gives the problem) you refer to an item which doesn't exist.
This could be due to a misspelling, or simply referring to an item incorrectly.
If you could post the relevant SQL, as well as info on the items it refers to, we can check it out for you.
Newbie
 
Join Date: Nov 2006
Posts: 2
#3: Nov 14 '06

re: Parameter value question


What I got is a patient form with a subform where I can search a patient and information about the patient will display in the subform.
I will now be able to put in multiple comments on one person on different dates.
I have the table linked to ID and it all works except for the parameter value box that comes up when the form opens or when I've made a search and will display the information about the patient.
Unfortunally I can't posed a zip file with the DB here, but if anyone wants to check it out I can e-mail it.
I haven't used any code simpley because I'm not good at it.
That's why I need your help.

Thanks

Mikael
msquared's Avatar
Administrator
 
Join Date: Aug 2006
Location: Dublin, Ireland
Posts: 10,880
#4: Nov 14 '06

re: Parameter value question


Quote:

Originally Posted by mickelingon

What I got is a patient form with a subform where I can search a patient and information about the patient will display in the subform.
I will now be able to put in multiple comments on one person on different dates.
I have the table linked to ID and it all works except for the parameter value box that comes up when the form opens or when I've made a search and will display the information about the patient.
Unfortunally I can't posed a zip file with the DB here, but if anyone wants to check it out I can e-mail it.
I haven't used any code simpley because I'm not good at it.
That's why I need your help.

Thanks

Mikael

NeoPa is right, somewhere it's looking for this date value and can't find it.

1. You say the subform has a list of dates and comments. What is the source of the subform? Is it another table? How is it tied to the main form? Does it have the PK of the main form as a foreign key and is that present on the subform (can be hidden)?

2. If you open the main form in design view. Click on the frame of the subform and open properties. Under the data tab what is the value in for Child and Master fields. Or are you using a filter?

3. Is there any code in either forms on open or on load events. If you're not sure then go to the properties for each form and look down the list under the events tab. If any of them has [Event Procedure] in them then click on the little button with dots to the right and copy as paste the code into a post. If any of them have macro names in them then check the macros.

4. In the subform check the properties of the control for the date field. Make sure that the control source (under the data tab) is set to the correct field in the underlying table or query. To be thorough you should also check the event list here.

I know that this is a lot of questions, but the parametre box only appears for a reason and that reason could fall under any of these issues.
NeoPa's Avatar
Administrator
 
Join Date: Oct 2006
Location: London - UK
Posts: 15,722
#5: Nov 14 '06

re: Parameter value question


It's true you can't post a file on here.
Instead, you can determine where the problem is occurring and find the dataset which is being run when this box pops up.
Although it may not be obvious, all datasets are represented in SQL somewhere.
If you can post the SQL of the dataset that's got the problem, and describe the data sources it uses (tables etc) then we can help anyway.
Reply