D
dksj67 via AccessMonster.com
Hello,
I created a query based on an inner join between two tables:
SELECT Panels.[Panel Name] AS [Panels_Panel Name], Panels.BreakerCt, Panels.
[Location Name], Panels.[Panel Building Number], Panels.[EMTS Number], Panels.
Source, Panels.Manufacturer, Panels.[Main Breaker Rating], Panels.[Main Bus
Rating], Panels.Trim, Panels.[Catalog Number], Panels.Voltage, Panels.
[Enclosure Type], Panels.Phase, Panels.Mounting, Panels.[Main Lugs Only],
Panels.[Notes:], [Panel Circuits].ID AS [Panel Circuits_ID], [Panel Circuits].
CircuitID, [Panel Circuits].[Circuit#], [Panel Circuits].[Panel Name] AS
[Panel Circuits_Panel Name], [Panel Circuits].[Layout Type], [Panel Circuits].
[Breaker Continuous Amps], [Panel Circuits].[Circuit Name], [Panel Circuits].
[A Loading (Watts)], [Panel Circuits].[B Loading (Watts)], [Panel Circuits].
[C Loading (Watts)]
FROM Panels INNER JOIN [Panel Circuits] ON Panels.ID=[Panel Circuits].[Panel
Name]
WHERE (((Panels.[Panel Name])=Forms!PanelLocations!Combo33));
The name of the query is "Panels Print Select".
The query runs just as it should. But then I reference this query in a form
and a report. The form's record source property says:
SELECT [Panels Print Select].[Panels_Panel Name], [Panels Print Select].
BreakerCt, [Panels Print Select].[Location Name], [Panels Print Select].
[Panel Building Number], [Panels Print Select].[EMTS Number], [Panels Print
Select].Source, [Panels Print Select].Manufacturer, [Panels Print Select].
[Main Breaker Rating], [Panels Print Select].[Main Bus Rating], [Panels Print
Select].Trim, [Panels Print Select].[Catalog Number], [Panels Print Select].
Voltage, [Panels Print Select].[Enclosure Type], [Panels Print Select].Phase,
[Panels Print Select].Mounting, [Panels Print Select].[Main Lugs Only],
[Panels Print Select].[Notes:], [Panels Print Select].[Circuit#], [Panels
Print Select].[Layout Type], [Panels Print Select].[Breaker Continuous Amps],
[Panels Print Select].[Circuit Name], [Panels Print Select].[A Loading (Watts)
], [Panels Print Select].[B Loading (Watts)], [Panels Print Select].[C
Loading (Watts)] FROM [Panels Print Select];
Now, when I run the query from the form or report a dialogue box comes up
with asking form me to enter "ID". I am guessing that it is refering to the
ID autonumber field on the Panels table (Panels.ID) in the inner join
statement above:
FROM Panels INNER JOIN [Panel Circuits] ON Panels.ID=[Panel Circuits].[Panel
Name]
Why is this box coming up? If I dont enter anything into it and press ok it
runs the form or report just as designed. The box is a nuisance and looks
shoddy. thanks
Dan Kreiling
I created a query based on an inner join between two tables:
SELECT Panels.[Panel Name] AS [Panels_Panel Name], Panels.BreakerCt, Panels.
[Location Name], Panels.[Panel Building Number], Panels.[EMTS Number], Panels.
Source, Panels.Manufacturer, Panels.[Main Breaker Rating], Panels.[Main Bus
Rating], Panels.Trim, Panels.[Catalog Number], Panels.Voltage, Panels.
[Enclosure Type], Panels.Phase, Panels.Mounting, Panels.[Main Lugs Only],
Panels.[Notes:], [Panel Circuits].ID AS [Panel Circuits_ID], [Panel Circuits].
CircuitID, [Panel Circuits].[Circuit#], [Panel Circuits].[Panel Name] AS
[Panel Circuits_Panel Name], [Panel Circuits].[Layout Type], [Panel Circuits].
[Breaker Continuous Amps], [Panel Circuits].[Circuit Name], [Panel Circuits].
[A Loading (Watts)], [Panel Circuits].[B Loading (Watts)], [Panel Circuits].
[C Loading (Watts)]
FROM Panels INNER JOIN [Panel Circuits] ON Panels.ID=[Panel Circuits].[Panel
Name]
WHERE (((Panels.[Panel Name])=Forms!PanelLocations!Combo33));
The name of the query is "Panels Print Select".
The query runs just as it should. But then I reference this query in a form
and a report. The form's record source property says:
SELECT [Panels Print Select].[Panels_Panel Name], [Panels Print Select].
BreakerCt, [Panels Print Select].[Location Name], [Panels Print Select].
[Panel Building Number], [Panels Print Select].[EMTS Number], [Panels Print
Select].Source, [Panels Print Select].Manufacturer, [Panels Print Select].
[Main Breaker Rating], [Panels Print Select].[Main Bus Rating], [Panels Print
Select].Trim, [Panels Print Select].[Catalog Number], [Panels Print Select].
Voltage, [Panels Print Select].[Enclosure Type], [Panels Print Select].Phase,
[Panels Print Select].Mounting, [Panels Print Select].[Main Lugs Only],
[Panels Print Select].[Notes:], [Panels Print Select].[Circuit#], [Panels
Print Select].[Layout Type], [Panels Print Select].[Breaker Continuous Amps],
[Panels Print Select].[Circuit Name], [Panels Print Select].[A Loading (Watts)
], [Panels Print Select].[B Loading (Watts)], [Panels Print Select].[C
Loading (Watts)] FROM [Panels Print Select];
Now, when I run the query from the form or report a dialogue box comes up
with asking form me to enter "ID". I am guessing that it is refering to the
ID autonumber field on the Panels table (Panels.ID) in the inner join
statement above:
FROM Panels INNER JOIN [Panel Circuits] ON Panels.ID=[Panel Circuits].[Panel
Name]
Why is this box coming up? If I dont enter anything into it and press ok it
runs the form or report just as designed. The box is a nuisance and looks
shoddy. thanks
Dan Kreiling