ms-access


Pivot combo box table in ms access


I am using this SQL:
TRANSFORM Max(table1.[quiz]) AS MaxOfquiz
SELECT table1.[quizdate], table1.[studentname], Max(table1.[quiz]) AS [Total Of
quizscores]
FROM table1
GROUP BY table1.[quizdate], table1.[studentname]
PIVOT table1.[coursename];
To try and pivot a combobox table:
Table1
ID quizdate coursename studentname quiz
1 02-Jan-21 math john 100
2 03-Feb-21 science joe 99
3 04-Mar-21 physics monica 97
4 05-Apr-20 language mike 88
Where coursename is a dropdown (math, science, physics, language) into
Table 2
studentname math science physics language
john 100
joe 99
monica 97
mike 88
I got these results:
quizdate studentname Total Of quizscores 1 2 3 4
4/4/2016 moe 88 88
1/1/2017 john 100 100
2/2/2017 joe 99 99
3/3/2017 monica 97 97
It seems that combox box coursename can't be pivoted as column name, but the
numbers instead. Can anyone explain how I can generate the correct results?
You answer it yourself:
Where coursename is a dropdown (math, science, physics, language)
So, in the query, the value from the field will be the ID of these "dropdowns".
To obtain coursenames, move these to a separate table and join this with Table1 in your query.

Related Links

VBA Access - Multiple Tables count by date
MS Access Pop-up on table modification
Combining multiple queries in one in Access
Fill table with all month days
Form based on a one-to-many relationship - just show parent records with child actions
Select Max Date by Date Range
MS Access Implementing FULL OUTER JOIN via UNION operator with AGGREGATION
access DLookUp multiple criteria
Combining 3 strings in Access VBA
DoCmd.TransferSpreadsheet triggering Error 3275 “unexpected error from external database driver”
Hyperlink Field with # in File Name
Access 2007: Creating an auto-updating record history
How to get an AfterUpdate procedure to update other fields in the same form
automatic conversion of Text into Decimal number - Access
Add column to table form to show value from a query
How do I set a variable to one of my form's listboxes in vba(access)?

Categories

HOME
maven
java
isabelle
plone
react-router
installshield
windows-server
mouse
esper
google-translate
izpack
wheelnav.js
vb.net-2010
phaser
fallback
try-catch
iolanguage
vaadin7
django-simple-history
django-admin
invantive-sql
visual-composer
xlsxwriter
trading
crosstab
semantic-analysis
neo4j-spatial
assistant
skia
directx-10
iframe-resizer
galsim
scorm2004
subset-sum
fusionpbx
host
ios5
git-merge
bitbucket-pipelines
jquery-bootgrid
web-mining
space-complexity
android-fingerprint-api
sas-visual-analytics
pdf-reactor
http-redirect
sas-jmp
wso2carbon
dotcover
atomicity
theming
dotnetzip
media-player
windows-mobile-6.5
memory-alignment
spring-mongodb
dynamics-sl
dwscript
xcb
ubuntu-10.04
packagist
rvest
two-factor-authentication
phpcas
jfugue
sysinternals
createprocessasuser
streambase
device-orientation
apache-commons-net
sorl-thumbnail
rake-task
dd
jscript.net
xcode-6.2
device-manager
valuechangelistener
c18
batterylevel
flashvars
kyotocabinet
factory-method
chuck
broken-links
gdata-api
wse3.0
nsmanagedobject
gcj
file-comparison
inotifycollectionchanged
actionview
pyinotify
visitor-statistic
site.master
dmx512
getresponsestream
adrotator
nerddinner
genealogy

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html