AQA computing CPT3 Village hall coursework Watch

MRS1608
Badges: 0
#21
Report 12 years ago
#21
You are on the right lines, Customer and Booking are good, the Billing table is also good. An alternative solution is that the Billing table could be calculated in a query on the fly (called a 'soft' table i.e. a view of the data) both solutions would work and therefore are correct.

Think about where you will hold the cost of each session - it is in a table or is it hard coded in a calculated query?



(Original post by maws)
What tables have you all created?

I currently have:

tblCustomer
tblBooking
tblBilling

My Primary Keys for each are:

Customer ID
Booking ID
Billing ID

Respectively.

Am I on the right track, or have I made a balls already?
0
quote
reply
maws
Badges: 0
#22
Report 12 years ago
#22
Thanks MRS.

Is it possible to create a validation rule for a Yes/No field which only allows it to be checked or unchecked if another field in the same table, which is a lookup table field, has a certain value chosen?



I want Evening Extension to be only be available if the value Evening in the Booking Session field is chosen.
0
quote
reply
MRS1608
Badges: 0
#23
Report 12 years ago
#23
You can apply very basic validation at the table level through field properties but more complicated validation has to be done at the form level using VBA (VB with al the reallly useful bits cut out of it!)

This nearly works, this code is attached to the check box mouse up event;

-------------------------------------------------

Public SessionType As String

Private Sub EveningExtension_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)

SessionType = BookingSession.Value
'you have to use the .value and not .text here

If SessionType <> "Evening" And EveningExtension.Value = True Then
MsgBox ("You can only book an extension if the Evening session is also being booked")
EveningExtension.Value = False
End If
End Sub
-----------------------------------

It works but sometimes needs a double click on the check box to trigger the validation message. Let me know if you can debug it!
0
quote
reply
HeadShock
Badges: 0
Rep:
?
#24
Report 12 years ago
#24
on my terrys turkeys i found that most of the work could be done using sql

http://www.w3schools.com/sql/default.asp

a good tutorial


you will need three tables
tbl_dates/bookings
tbl_customer
tbl_billing


ok each customer can have more than one booking

so thats a one to many relationship
you can either have each customer having one unqiue bill for each booking.


or one bill for all the bookings

relationship diagram

One to many one to one
customer--<dates/bookings-----billing


examples:::
tbl_dates/bookings

booking ID (primary ID)
date
customer Id (foreign key)


tbl_ billing

Bill ID (primary Id)
Booking Id (foreign key) (
total ( the data will be inputted using an update query thats my best advice)

tbl_customer is easy


Remember your foreign keys!!!


http://files.filefront.com/Thebvillj.../fileinfo.html
download a copie made by my friend joey whos currently studing his a2s
we worked on this straighter after terrys for fun
0
quote
reply
Please_Help
Badges: 0
#25
Report 12 years ago
#25
Hi im really stuck on this project does anyone have a working system so i can get some ideas? thank you
0
quote
reply
JamieB
Badges: 0
Rep:
?
#26
Report 12 years ago
#26
What you stuck on? Show your code (pseudo if you like) or explain what you want to do and we will try to help.

Jamie
0
quote
reply
Please_Help
Badges: 0
#27
Report 12 years ago
#27
Im Stuck as i dont really know how to start it or what i am supposed to be doing, i have been told to use access so thats what i will use but im not very familiar with it. And i have read all through the AQA Requirements pages for the coursework but i am quite confused.

Any Help would be gladly accepted, Thanks.
0
quote
reply
KymmyC
Badges: 0
Rep:
?
#28
Report Thread starter 12 years ago
#28
i barely know how to use access and now i've been told that i need to use VBA (visual basics fo applications)
anyone got any ideas where i could get some help?? (my teachers are being of NO help, i have two teachers who keep telling me different things)
My programming isn't top notch and i would be grateful for any advice!!
0
quote
reply
wo22a
Badges: 0
#29
Report 12 years ago
#29
hey,
Looking at the spec we've got to produce a total monthly report for the weekly percentage usage of each slot- Morn, Afternoo, Even, Even ext. I used a lookup table on my bookings table so whichever can be selected. What i cant do is get the percentage of the amount chosen of each slot. how many total slots are used a week- it says in the spec 21 but i cant see how they got 21 slots? :confused:

Could someone please shed some light for me because ive only got a couple of weeks to get it done.

Thanks in advance

Woz

P.s any1 know how to set up the relationships coz im having big trouble. I have tables for- Customer, Account, Booking and Bill
Cheers
0
quote
reply
KymmyC
Badges: 0
Rep:
?
#30
Report Thread starter 12 years ago
#30
are the 21 slots:
morning, afternoon and evening for the seven days of the week??
0
quote
reply
wo22a
Badges: 0
#31
Report 12 years ago
#31
Oh yeh, of course, i was thinking that evening ext was a totally different slot but i suppose thats embedded within evening.
So thats sorted

only the report to sort out. I cant figure what i need to do??? :confused:

Cheers

Woz
0
quote
reply
butterflyz88
Badges: 0
Rep:
?
#32
Report 12 years ago
#32
If anyone has any questions about what is needed for the documentation, I have some useful guidance sheets given to me for when I did Terry's Turkeys last year, saved as .pdf (helped me get 100%!!!) Just message me with your email address and I'll send it to you!

Promise not to abuse your address!
0
quote
reply
moagli
Badges: 0
#33
Report 12 years ago
#33
Does nayone know how to run a query or else some visual basic code that will count the number of slots taken, eg friday morning and friiday afternoon will not be counted by just the friday??

Any help with this would be greatly appricated, its just with the monthly stats report.
0
quote
reply
JamieB
Badges: 0
Rep:
?
#34
Report 12 years ago
#34
Run a query?

Presuming ADODC Control.

dim strsql as string
strsql = "Query Here"
with adodc1
.enabled = false
.commandtype = adcmdtext
.recordsource = strsql
.refresh
.enabled = true
end with

Bare in mind this would need to be connected to your database. An easier way is to use Access to generate the code then copy and paste into your project.

Oh and just to add, getting this project to work should NOT be your main priority, the documentation and exam will be (presuming its not changed since ive done it), me and a lot of the better programmers in my old college actually didn't do as well as people who were good at english (I got a C in this) on this AS project because of the way it is marked. Documentation is definitely the key. Next years project is all programming (probably why i got close to full marks), so bare that in mind when spending all hours making the forms look colourful
0
quote
reply
wo22a
Badges: 0
#35
Report 12 years ago
#35
Hey, Ive been trying to make up the report where it has to show the monthly percentage usage of each slot- morning, evening, afternoon.

What i cant do is count the amount that has been selected(as i have used a lookup box) and then transfer this to a report.
Does any1 know how to count the amount of times each was selected- i can query up each slot but can you get a numerical number instead of a list of all the morning/afternoon/evening queries? :confused:

Also how can you use the same field from different queries- is this possible, coz i get a message saying "you have chosen fields from a table and from a query based on that table and from a query based on that table. If so try choosing fields from only the table or only the query"

Cheers for all the help. :cool:
Woz

oh yeh- those sheets came in useful butterflyz88. Thanks a lot
0
quote
reply
butterflyz88
Badges: 0
Rep:
?
#36
Report 12 years ago
#36
No problem about the sheets! Glad they have helped. I also have sheets on Normalisation and Validation, but by the sounds of it everyone is way past that stage

You are doing your project in Access? If so, you could try making a query, selecting the totals row (the greek letter Sigma (or funny looking capital E to the rest of us ) in the toolbar) and selecting Count from the drop down box.
Attached files
0
quote
reply
lozbritt9
Badges: 0
#37
Report 12 years ago
#37
Hey im doing my coursework in VB and i have two questions.

Firstly, i would like to know how to make my check box show up when the combo box is set to evening and the date booked is a friday or saturday. This is the code i have....

Private Sub Combo1_Click()

Dim dateordered As Date
dateordered = date_ordered
If (Combo1.Text = "Evening") And (Weekday(dateordered) = 6) Then Check1.Visible = True Else Check1.Visible = False
If (Combo1.Text = "Evening") And (Weekday(dateordered) = 7) Then Check1.Visible = True Else Check1.Visible = False


End Sub

However when i change the combo box to evening even though the date ordered is <> friday or sat the check box still appears, i would appreciate some help here.

My second Problem is; my school does not have visual basic on their system, and i would like to somehow work on my project in school. I was wondering is there any free IDE's that would work, for editing and continuing my project without the need of having visual basic (6).

Would also like to talk to anyone that is doing there project in VB

Thanks in advance....

O and one last problem! This is the fact that when i make the program stand alone and take it away it doesnt work properly as it looks for the databases at the specified place and cant find it. Is there a way that i could put it all in a zip file and make the program point to it, wherever the zipfile is on the system.

Thanks again.
0
quote
reply
JamieB
Badges: 0
Rep:
?
#38
Report 12 years ago
#38
This should work....

Code:
If Combo1.text = "Evening" And (Weekday(dateordered) = 6 or Weekday(dateordered) =7) then
   Check1.Visible = true
Else
   Check1.Visible=False
End if
There are no IDE's that i know of apart from the VB IDE, also the target system will need the Visual Basic 6 run-time dll.

You have a few choices for your database, im guessing your using ADODC Controls. Either you can use ADO directly, by using remote connections and recordsets, or try this, which may or may not work.

Code:
'Put this in a module
Public Const strConnectionString = 'Path here

'Put this on the main form/module
Public Sub ChangeConnectionStrings(ByVal strConnection as String)
  Dim cntControl as Control

  For each cntControl in 'ProjectName
     if typeof cntControl is adodc then
        adodc.Connectionstring = strConnection
     end if
  next
Personally using ADO directly will be a better alternative in the long run to ADODC controls anyhow. If by some chance you are not using these controls, just miss out half of that

Jamie
0
quote
reply
BarcodeBoy
Badges: 0
#39
Report 12 years ago
#39
I was just wondering before I get too deep into the coursework do you have to use a programing language or can everything be done in access, because my class hasn't really learnt how to program so would be a real pain.
0
quote
reply
teachercol
Badges: 9
Rep:
?
#40
Report 12 years ago
#40
(Original post by BarcodeBoy)
I was just wondering before I get too deep into the coursework do you have to use a programing language or can everything be done in access, because my class hasn't really learnt how to program so would be a real pain.
You can do this project in Access (with macros to automate certain parts) rather than using a prgramming language like VB. The AQA have said that future (3y time?) projects will require to be done in a programming language entirely.
0
quote
reply
X

Quick Reply

Attached files
Write a reply...
Reply
new posts
Latest
My Feed

See more of what you like on
The Student Room

You can personalise what you see on TSR. Tell us a little about yourself to get started.

Personalise

University open days

  • University of Lincoln
    Mini Open Day at the Brayford Campus Undergraduate
    Wed, 19 Dec '18
  • University of East Anglia
    UEA Mini Open Day Undergraduate
    Fri, 4 Jan '19
  • Bournemouth University
    Undergraduate Mini Open Day Undergraduate
    Wed, 9 Jan '19

Were you ever put in isolation at school?

Yes (199)
27.95%
No (513)
72.05%

Watched Threads

View All