The Student Room Group

Scroll to see replies

Reply 140
A calculation query for the 10point deduction of points? help
kapre
so, ok, i have a login form where the customer enters there card numba
thn this goes to their account details i.e. members tbl where all fields r locked 4 strictly viewing purposes i.e. confirm details.
on tht form, there is a button saying correct and one saying ammend
so.. correct will take thm to the member form with any reservations they have made on it (total points at bottom in footer)
and... ammend tkes thm 2 a similar form with relevant field unlocked

where frm ther????

btw... on the login form where they enter their card number... if i use a button that allows them to register.... what do i do i.e. record operations- open etc. i dnt get it because i cnt go 2 nu record ther is none on tht form and i cnt tke it to a member frm it has new details


Use a macro to OpenForm then in the view mode or something in the properties at teh bottom it should say add. Use this as it auto goes to a new record.
xRanix
This is the code that will do the same thing you need in a quick way although it would mean you have to memorise it, might not be easy!

Private Sub Command16_Click()
On Error GoTo Err_Command16_Click


DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
MsgBox ("Thank You! Your account number is: " & Format(Me.IDNum, "5555194600000000"))
DoCmd.GoToRecord , , acNext
Exit_Command16_Click:
Exit Sub

Err_Command16_Click:
MsgBox Err.Description
Resume Exit_Command16_Click

End Sub


i got this from my sis.

Btw i am trying to do the macro via the 'view, conditon' etc way. i am following your previous post when you said "SetValue:- item = user / member points field, expression = user / member points - ride points -10. (no brackets needed)."

i tried to enter the set value as user/member points field (and thats how i wrote it) but i keep getting an error! what format did you use and did you type straight into the box or did you click the button and do it via the other window?


thanks


First it is easier to use the build, right click on the item box and press build. Then go through the forms till you get the right field. These were not the explicit field names on teh form just an indicator of what fields u need to use depending on how you created youre system. All items and expressions need to be done like this, using the build function.
In a test database I made for the reservation and points update I'm using vb to run the query and throw up error/confirmation messages.


Private Sub add_Click()




Dim varAnswer As VbMsgBoxResult
Dim SQL As String

varAnswer = MsgBox("Do you wish to save these details?" & vbCrLf & vbCrLf & "Your account will be charged for the ride on accepting.", vbYesNo, "Thanks")



If varAnswer = vbNo Then
MsgBox "Please re-enter your details", vbOKOnly

Else


SQL = "UPDATE Members SET Members.[Account Balance] = Members.[Account Balance] - " & Me.RideCost & " WHERE Members.CustomerID = " & Me.Customer_ID


DoCmd.RunSQL SQL

MsgBox "Thank you for making your reservation." & vbCrLf & vbCrLf & "Your details have been saved; you will now be returned to the main menu.", vbOKOnly

DoCmd.Close acForm, "Reservation2", acSaveYes

End If
End Sub



As long as it performs the task and I document it/explain it well, why wouldn't it be marked? Or will it?

____
Aaron, in the 'Correct_Database' model you gave us. You can login with numbers, letters or symbols; it comes up with a blank form. Shouldn't it throw up an error?
Reply 144
I learnt how to do the login form with teacher..i remebered all the codes in order to do this.. but unfortuantely its not working in the exam lol.

For all you guys n gals doing the same exam, its 4 tables with 3 primary keys.. if you pass that and manage to complete the relationships... you got urself an E remeber that in the reservation table there are only 2 composite keys (session number and customer ID)...the rest is a doddle... if you can get up to the reservation form.. u got a low B. Im stuck on the login form.. im gonna forget that and continue with the reservation tomo
Reply 145
Nutty Prof.
(Maa udar, tery bain ne lun chut!), can u help? im using access in swedish and keep getting this error when i create macro's.

haha oh balle tere!
Reply 146
does anyone know how to get the word 'Student' wirtten at the bottom of only the student cards???

and does anyone know how you get the number of cards printed and the number of cards printed of students at the bottom of the report?

and also how do you do an update query so it updates the members who's cards have been printed?

ANYONE PLEASE HELP ME, ONLY HAVE 1 HOUR LEFT
Reply 147
You use a count sum

=Count([Student]=Yes,"Student","")

You need to make sure that the query that the report is based on, in the criteria has a '0' in it. You then go into the report and click on the student tick box (it is a Yes/No field) and you make it invisible (right-click, properties, second or third one down)

You then go back to the report design view and make a 'ab' box with the above sum in the unbound section.

EASY
Reply 148
not so eazy 4 me.... we didnt learn none of this stuff n wen i asked my teacher how to do certain tingz he literally sd "I don't know" - wit no shame in sayin so. he couldn't work it out nitha

oh well, hopefully ill be gud wit databases by time resit comes

thnkx all 4 help

bless
finished now, thank god.

and you wouldnt use a count there lol would be an if
=IIF(Student]=True,"STUDENT","")


and to get it to count the students is an if in a count
=Count(IIf([Student]=True,0))
hey guys
I'm going to start this exam 2moz and was wondering if you got the text file?
Also can u help me with the first bit about importing the text file to excel where somehow you need to organize the numbers. My teacher said i needed to save each section in a different spreadsheet and have spaces and commas in some numbers and names. He said save it as a CSV.

If you can i need urgant help
P.S. i am taking the may 2008 exam (the green bay building company)
01shqiperia
hey guys
I'm going to start this exam 2moz and was wondering if you got the text file?
Also can u help me with the first bit about importing the text file to excel where somehow you need to organize the numbers. My teacher said i needed to save each section in a different spreadsheet and have spaces and commas in some numbers and names. He said save it as a CSV.

If you can i need urgant help
P.S. i am taking the may 2008 exam (the green bay building company)



think you're a bit late. This exam in particular finished in January. :wink:
I done the first one which was about the rides but i am resitting it again as failed so i am now doing this one which is the green bay building company. Start 2moz and have no clue how the hell it works.
Have you done this exam yet?

Latest