Parameter queries don't work on all computers.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I use several parameter queries that get their parameter values from form and
subform controls. I use them to link subforms and populate combo boxes. They
work well. The back end is on a network drive I: . When I copy the front end
and use it on another computer the queries prompt for the parameter values.
The linking to the back end seems to be right.
 
Hi,


Do you use the syntax FORMS!FormName!ControlName INSIDE the query? or
outside, like:

str = ".... WHERE fieldName = " & Forms!FormName!ControlName


If you use the second syntax, is the regional setting generates the same
output? As example, date-time can be different, or even the decimal
delimiter may not be a dot on all machines: if it is a coma on some
machines, that may cause a concatenated result like:

... WHERE fieldName = 4, 5

while you expect


... WHERE fieldName = 4.5


and so, you end up with a list, with values 4 and 5, rather than a single
value.



That is just ONE of the possible case, your problem is just too "fuzzy" for
us to pin point the problem.



Hoping it may help,
Vanderghast, Access MVP



...
 
Hi Michel,

Thanks for your response.
Example:
WHERE
(((Instances.Inspection_Number)=[Forms]![Inspections]![Inspection_Number])
AND
((Instances.Unit_Number)=[Forms]![Inspections]![Inspection_Units].[Form]![Unit_Number])
AND
((Instances.Subsystem_Number)=[Forms]![Inspections]![Inspection_Units]![Subsystems].[Form]![Subsystem_Number])
AND
((Instances.Instance_Number)=[Forms]![Inspections]![Inspection_Units]![Subsystems]![Instances].[Form]![Instance_Number]));
This is the from a query which is a record source for a form which opens
with a macro in a button's clicked event. The button is on one of the
subforms of the Inspections form. That all works. When I use the form on an
identical computer on the same network it prompts for parameter values.
-- Thanks again,
Regards,
GLHILL


Michel Walsh said:
Hi,


Do you use the syntax FORMS!FormName!ControlName INSIDE the query? or
outside, like:

str = ".... WHERE fieldName = " & Forms!FormName!ControlName


If you use the second syntax, is the regional setting generates the same
output? As example, date-time can be different, or even the decimal
delimiter may not be a dot on all machines: if it is a coma on some
machines, that may cause a concatenated result like:

... WHERE fieldName = 4, 5

while you expect


... WHERE fieldName = 4.5


and so, you end up with a list, with values 4 and 5, rather than a single
value.



That is just ONE of the possible case, your problem is just too "fuzzy" for
us to pin point the problem.



Hoping it may help,
Vanderghast, Access MVP



...
 
Karl,
Thanks for your response. The question is why and how can I change things.

Example:
WHERE
(((Instances.Inspection_Number)=[Forms]![Inspections]![Inspection_Number])
AND
((Instances.Unit_Number)=[Forms]![Inspections]![Inspection_Units].[Form]![Unit_Number])
AND
((Instances.Subsystem_Number)=[Forms]![Inspections]![Inspection_Units]![Subsystems].[Form]![Subsystem_Number])
AND
((Instances.Instance_Number)=[Forms]![Inspections]![Inspection_Units]![Subsystems]![Instances].[Form]![Instance_Number]));
This is the from a query which is a record source for a form which opens
with a macro in a button's clicked event. The button is on one of the
subforms of the Inspections form. That all works. When I use the form on an
identical computer on the same network it prompts for parameter values.
-- Thanks again,
 
Hi,


Unless the two Inspection is not open, I don't see. There are not-null
values in each of the required controls?


On the PC where it does not work, in the immediate debug window, does

? [Forms]![Inspections]![Inspection_Number])


work or generates an error? same for the other three controls.



Hoping it may help,
Vanderghast, Access MVP


GLHill said:
Hi Michel,

Thanks for your response.
Example:
WHERE
(((Instances.Inspection_Number)=[Forms]![Inspections]![Inspection_Number])
AND
((Instances.Unit_Number)=[Forms]![Inspections]![Inspection_Units].[Form]![Unit_Number])
AND
((Instances.Subsystem_Number)=[Forms]![Inspections]![Inspection_Units]![Subsystems].[Form]![Subsystem_Number])
AND
((Instances.Instance_Number)=[Forms]![Inspections]![Inspection_Units]![Subsystems]![Instances].[Form]![Instance_Number]));
This is the from a query which is a record source for a form which opens
with a macro in a button's clicked event. The button is on one of the
subforms of the Inspections form. That all works. When I use the form on
an
identical computer on the same network it prompts for parameter values.
-- Thanks again,
Regards,
GLHILL
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top