T
TotallyConfused
I failed to put details in my previous post. I would very much aprpeciate if
someone can help me with this.
Thank you so much for responding. I have included SQL for the Combo Box, the
list Box, Main form and subform. What I would like is an Option Group Box
that lists County, City and Company. This would enable the user to choose
how she/he wants to see the data. Therefore, what ever option is chosen, the
Doc list will list the doctors by the option chosen. As I mentioned below.
This works fine for the County but I need to add City and Company. I don't
know how to do this without messing up what I have already. I would
appreciate any help. Thank you.
Combo Box 1
SELECT [qry Counties].[County]
FROM [qry Counties]
GROUP BY [qry Counties].[County]
ORDER BY [qry Counties].[County];
Doc List
SELECT DISTINCT [tblOFCTRKG].ID, [tblOFCTRKG].[DOCID],
[tblOFCTRKG].[DOCNM], [tblOFCTRKG].[DOCPH], [tblOFCTRKG].[PRVDR FX],
[tblOFCTRKG].[DOCADD], [tblOFCTRKG].[DOCADD2], [tblOFCTRKG].[DOCCITY],
[tblOFCTRKG].St, [tblOFCTRKG].[DOCCNTY]
FROM [tblOFCTRKG]
GROUP BY [tblOFCTRKG].DOCID, [tblOFCTRKG].[DOCID], [tblOFCTRKG].[DOCNM],
[tblOFCTRKG].[DOCPH], [tblOFCTRKG].[PRVDR FX], [tblOFCTRKG].[DOCADD],
[tblOFCTRKG].[DOCADD2], [tblOFCTRKG].[DOCCITY], [tblOFCTRKG].St,
[tblOFCTRKG].[DOCCNTY], [tblOFCTRKG].ID
HAVING ((([tblOFCTRKG].[DOCCNTY])=[forms]![frm DOC Tracking]![PickCounty]))
ORDER BY [tblOFCTRKG].[DOCNM], [tblOFCTRKG].[DOCPH];
MainForm
SELECT [tblOFCTRKG].ID, [tblOFCTRKG].[DOCID], [tblOFCTRKG].[DOCNM],
[tblOFCTRKG].[Next MLP], [tblOFCTRKG].[Company], [tblOFCTRKG].[DOCPH],
[tblOFCTRKG].[PRVDR FX], [tblOFCTRKG].[DOCADD], [tblOFCTRKG].[DOCADD2],
[tblOFCTRKG].[DOCCITY], [tblOFCTRKG].[DOCSt], [tblOFCTRKG].[DOC ZIP],
[tblOFCTRKG].[DOCCNTY], [tblOFCTRKG].[Add ID],
FROM [tblOFCTRKG];
SubForm
DOCID
someone can help me with this.
Thank you so much for responding. I have included SQL for the Combo Box, the
list Box, Main form and subform. What I would like is an Option Group Box
that lists County, City and Company. This would enable the user to choose
how she/he wants to see the data. Therefore, what ever option is chosen, the
Doc list will list the doctors by the option chosen. As I mentioned below.
This works fine for the County but I need to add City and Company. I don't
know how to do this without messing up what I have already. I would
appreciate any help. Thank you.
Combo Box 1
SELECT [qry Counties].[County]
FROM [qry Counties]
GROUP BY [qry Counties].[County]
ORDER BY [qry Counties].[County];
Doc List
SELECT DISTINCT [tblOFCTRKG].ID, [tblOFCTRKG].[DOCID],
[tblOFCTRKG].[DOCNM], [tblOFCTRKG].[DOCPH], [tblOFCTRKG].[PRVDR FX],
[tblOFCTRKG].[DOCADD], [tblOFCTRKG].[DOCADD2], [tblOFCTRKG].[DOCCITY],
[tblOFCTRKG].St, [tblOFCTRKG].[DOCCNTY]
FROM [tblOFCTRKG]
GROUP BY [tblOFCTRKG].DOCID, [tblOFCTRKG].[DOCID], [tblOFCTRKG].[DOCNM],
[tblOFCTRKG].[DOCPH], [tblOFCTRKG].[PRVDR FX], [tblOFCTRKG].[DOCADD],
[tblOFCTRKG].[DOCADD2], [tblOFCTRKG].[DOCCITY], [tblOFCTRKG].St,
[tblOFCTRKG].[DOCCNTY], [tblOFCTRKG].ID
HAVING ((([tblOFCTRKG].[DOCCNTY])=[forms]![frm DOC Tracking]![PickCounty]))
ORDER BY [tblOFCTRKG].[DOCNM], [tblOFCTRKG].[DOCPH];
MainForm
SELECT [tblOFCTRKG].ID, [tblOFCTRKG].[DOCID], [tblOFCTRKG].[DOCNM],
[tblOFCTRKG].[Next MLP], [tblOFCTRKG].[Company], [tblOFCTRKG].[DOCPH],
[tblOFCTRKG].[PRVDR FX], [tblOFCTRKG].[DOCADD], [tblOFCTRKG].[DOCADD2],
[tblOFCTRKG].[DOCCITY], [tblOFCTRKG].[DOCSt], [tblOFCTRKG].[DOC ZIP],
[tblOFCTRKG].[DOCCNTY], [tblOFCTRKG].[Add ID],
FROM [tblOFCTRKG];
SubForm
DOCID