In my attachment (file access 2010)
I want to show some information from a form but i don't know how to write code on query or on a form load.
Described here:
I want to make report that run from a Form that just show only a specific year
Example I just choose from combo box a year that I want to searh, e.g. just 2011
So I want to make a form that show me some information
1. City of student (i can choose all or specific city)
2. Year (i can choose all or specific year and just year format)
3. Start Date
4. End Date
5. Score review
the information must show:
Total of student : ?
Total of student that has score above score review : ?
Average
and the information can you see on my attachment.
Thanks
On a few general notes to your database.
The cities should not be stored as text. You need to create a separate lookup table to contain the cities.
The score should not be kept as text. If its a number keep it as a number, otherwise you will get all sorts of weird results when doing comparisons.
Your design nor question mentions not what to do when a student has more then 1 score.
You have a table Score with a field score. Thats a bad idea, as access gets confused as to whether you are referring to the field or the table. Its a good idea to use a certain notation when naming fields and objects (look up Hungarian notation) as it helps document the database and what the objects are for. I for example prefix all table names with a tbl such as tbl_Student and tbl_Scores.
Last comment, in your scores table you have a field Customer_ID which I can only assume should have been named Student_ID.
6 2549
You mix back and forth between using the terms form and report, so it gets a bit confusing. Do you want your report to ONLY show the summary information?
there are 2 output that i want to show.
1st when i click submit button then i will get some value on the form,
2nd when i click print report then i will get all information on report that i haven't create on the example.
Please see my attachment
Sorry, I don't download attachments from people I don't know. If you can't explain it with a screenshot and text there is also a fairly good chance that I wont be able to make sense of your database either, that just experience talking here.
If you can explain it with screenshots and text I will be happy to try and help, or you can wait around and see if there is someone who is willing to download and open the attachment.
Sory for the attachment
I have two table like this
and form like this
the question is how to make query for that?
Okay, now we are getting somewhere.
As for the the places marked "?" in your form you can get those values by using a domain function such as dcount.
I have uploaded an example of how to do it, using a query that draws part of its criteria from the form.
Its not perfect, for instance it only reacts to begin and end dates, and not the year textbox for instance.
But you can take a look at it, work on it some yourself (its your assignment after all) and then come back when you run into a new problem.
On a few general notes to your database.
The cities should not be stored as text. You need to create a separate lookup table to contain the cities.
The score should not be kept as text. If its a number keep it as a number, otherwise you will get all sorts of weird results when doing comparisons.
Your design nor question mentions not what to do when a student has more then 1 score.
You have a table Score with a field score. Thats a bad idea, as access gets confused as to whether you are referring to the field or the table. Its a good idea to use a certain notation when naming fields and objects (look up Hungarian notation) as it helps document the database and what the objects are for. I for example prefix all table names with a tbl such as tbl_Student and tbl_Scores.
Last comment, in your scores table you have a field Customer_ID which I can only assume should have been named Student_ID.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Andante.in.Blue |
last post by:
Hi everyone! I was wondering if there is a away to use Access 97's
build in filter-by-form function but restrict its effect to just the
subform.
I have a parent form that shows the major...
|
by: Terry |
last post by:
I have cerated a Form, ExamsFrm, which is used to input details of
exams taken at several Centres. It dosplays details from StudentTbl
and has a SubForm which displays details from ExamsTble.
I...
|
by: Tony Williams |
last post by:
Sorry to repost but I cannot work this out. Can anyone come up with a
suggestion?
I have a main form based on Table1. The form has a tab control of three
pages. Each page has a subform based on a...
|
by: dhowell |
last post by:
In reading some of the posts on this group, it appears as though it is
not strait forward at all to filter a form, which has subforms, by
criteria which are either on subforms or span more than one...
|
by: Dave G |
last post by:
Since upgrading one of my clients from A97/W2000 to A2003/XP they have
suffered no end of data corruption problems, mainly involving one of
the main tables. The corruption can result in one...
|
by: dennishancy |
last post by:
I have a form and a subform.
One of the fields on the primary form is employee number, whose values
are in a combo box.
Here are the steps I am taking:
- I click on Filter by Form
- From...
|
by: San |
last post by:
Hey,
I need to create a form with several text boxes in which users type in
key words, press a command button on the form and it opens a matching
record. Thanking you in advance.
|
by: jcf378 |
last post by:
hi all.
I have a form which contains a calculated control ("days") that outputs the # of days between two dates (DateDiff command between the fields and ).
However, when I click "Filter by...
|
by: Jim Mandala |
last post by:
Using Access 2003 front end; SQL Server 2005 Back end:
I have a complex form that has lots of data fields including about
thirty or so checkboxes storing Yes/No data that I would like my users...
|
by: tekctrl |
last post by:
Environment; Win2K PC with 1Gb of RAM and plenty of HD space running Access
2002
Issue; Access presents a blank data entry form in the Forms view when the
New Record icon is used. However, it...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
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...
|
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,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
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: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
| |