473,396 Members | 2,011 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

MS Access Query with Distinct Column field Selection



1. MS ACCESS COMBO LIST = JAN;FEB;MAR;APR;MAY;
-----------------------------------

2. DATA TABLE:
N1 | N2 | N3 | JAN | FEB | MAR | APR | MAY |
--------------------------------------------
a1 | a2 | a3 | 1 | 2 | 3 | 4 | 5 |
b1 | b2 | b3 | 10 | 20 | 30 | 40 | 50 |
c1 | c2 | c3 | 11 | 22 | 33 | 44 | 55 |

3. COMBO LIST SELECTION = FEB (Parameter may vary could be any column
fields from JAN to DEC)

4. RESULTS TABLE:

N1 | N2 | N3 | FEB |
--------------------
a1 | a2 | a3 | 2 |
b1 | b2 | b3 | 20 |
c1 | c2 | c3 | 22 |
5 Is this RESULTS table possible in MS Access along with the combo
option?
Jun 27 '08 #1
1 1600
bb*******@hotmail.com wrote:
>
1. MS ACCESS COMBO LIST = JAN;FEB;MAR;APR;MAY;
-----------------------------------

2. DATA TABLE:
N1 | N2 | N3 | JAN | FEB | MAR | APR | MAY |
--------------------------------------------
a1 | a2 | a3 | 1 | 2 | 3 | 4 | 5 |
b1 | b2 | b3 | 10 | 20 | 30 | 40 | 50 |
c1 | c2 | c3 | 11 | 22 | 33 | 44 | 55 |

3. COMBO LIST SELECTION = FEB (Parameter may vary could be any column
fields from JAN to DEC)

4. RESULTS TABLE:

N1 | N2 | N3 | FEB |
--------------------
a1 | a2 | a3 | 2 |
b1 | b2 | b3 | 20 |
c1 | c2 | c3 | 22 |
5 Is this RESULTS table possible in MS Access along with the combo
option?
You didn't specify how you wanted to play/display the data.

Dim s as string
s = "Select N1, N2, N3, " & Me.ComboList & " From DataTable"
You could then make the above a report/form's recordsource (tho you'd
need to modify the textbox name for the month). You could open it as a
recordset. You could create a querydef with it.

Golly
http://www.youtube.com/watch?v=fjvdcd1Nldo
Jun 27 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Paxton | last post by:
Hi, I'm trying to display the total page views per page within a given date range, but the correct SQL is seemingly beyond me. I get the correct result with a straightforward Group By and Count...
14
by: Sean C. | last post by:
Helpful folks, Most of my previous experience with DB2 was on s390 mainframe systems and the optimizer on this platform always seemed very predictable and consistent. Since moving to a WinNT/UDB...
5
by: sling blade | last post by:
Hi, I have an web app and I am using access 2002 and VB.net. I am using a data adapter to fill a dataset. I am retrieving product descriptions, some are long and i have used a field of memo...
0
by: Andrew | last post by:
Hello, I am trying to create a chart whose underlying query is linked to 2 combo boxes on the same form. I want to pass the values from the combo boxes into the chart query to allow the chart...
1
by: Intrepid_Yellow | last post by:
Hi, I have the following code that runs my report generator. The user selects a table from a combo box, then whatever fields they want from a list box. (This part all works and the report runs...
4
by: etuncer | last post by:
Hello All, I have Access 2003, and am trying to build a database for my small company. I want to be able to create a word document based on the data entered through a form. the real question is...
0
MMcCarthy
by: MMcCarthy | last post by:
Rather than using the Access design view change the view to SQL. I am going to attempt to outline the general syntax used for SQL queries in Access. Angle brackets <> are used in place of some...
4
by: zion4ever | last post by:
Hello good people, Please bear with me as this is my first post and I am relative new to ASP. I do have VB6 experience. I have a form which enables users within our company to do an intranet...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.