A
Alex
I have a form with a combo box using the SQL query below. For some reason,
the combo box is not showing a list of values for the correct model.
Regardless of the model, it shows the list for the model shown in the first
record. If I copy the SQL to a new query and run it, I type the desired
model when the parameter box pops up and it works fine. I'm using the same
tbl for my query that populates my form as I am for the combo box; could that
be the problem? SQL below. Thank you.
Combo Box:
SELECT Infotbl.part, Infotbl.nhl, Infotbl.model, Infotbl.source
FROM Infotbl
WHERE (((Infotbl.model)=[forms]![infofrm]![txtmodel]) AND
((Infotbl.source)="excela"));
Form's datasource query:
SELECT Infotbl.model, Infotbl.part, Infotbl.nhl, Infotbl.source,
Infotbl.qty, POtbl.buyer, POtbl.supplier, Infotbl.Refpart,
Infotbl.refpartnhl, Infotbl.nhlnhl, Infotbl.status, Infotbl.makebuy,
Infotbl.matl, Infotbl.var, Infotbl.npc, Infotbl.variable
FROM (Infotbl INNER JOIN Model ON Infotbl.model = Model.model) LEFT JOIN
POtbl ON Infotbl.Refpart = POtbl.part
WHERE (((Infotbl.source)="new"));
the combo box is not showing a list of values for the correct model.
Regardless of the model, it shows the list for the model shown in the first
record. If I copy the SQL to a new query and run it, I type the desired
model when the parameter box pops up and it works fine. I'm using the same
tbl for my query that populates my form as I am for the combo box; could that
be the problem? SQL below. Thank you.
Combo Box:
SELECT Infotbl.part, Infotbl.nhl, Infotbl.model, Infotbl.source
FROM Infotbl
WHERE (((Infotbl.model)=[forms]![infofrm]![txtmodel]) AND
((Infotbl.source)="excela"));
Form's datasource query:
SELECT Infotbl.model, Infotbl.part, Infotbl.nhl, Infotbl.source,
Infotbl.qty, POtbl.buyer, POtbl.supplier, Infotbl.Refpart,
Infotbl.refpartnhl, Infotbl.nhlnhl, Infotbl.status, Infotbl.makebuy,
Infotbl.matl, Infotbl.var, Infotbl.npc, Infotbl.variable
FROM (Infotbl INNER JOIN Model ON Infotbl.model = Model.model) LEFT JOIN
POtbl ON Infotbl.Refpart = POtbl.part
WHERE (((Infotbl.source)="new"));