View Full Version : need help with these 2 problems


paradox_nz
09-01-2008, 01:31 AM
hi all this is my first thread here hope it will be a good experience for me in this forum.

there are 2 parts for this problem each in separate folder

for part one:
the comments inside VBA in the access file explains what is needed to done.

for the part two :
in the function named CalculateFitnessBands(), a code should be created to simulate the behavior of the Fitness Bands button from the .mde file

using FOR..NEXT statement along with IF..THEN..ELSE statements
without altering the following lines :

Public Function CalculateFitnessBands(intAge As Integer, _
intRHR As Integer, _
bytFitnessLevel As Byte)

End Function



any help will be appreciated. the files are attached with this thread.

DCrake
09-01-2008, 02:06 AM
As this is your first post I need to point out to you that we are here to help, however, by supplying an mde file will not enable us to view your code, thus we cannot offer solutions. If you want a meaningful reply then you will need to provide the mdb version.

We are not here to rip off your code. If there is a reason why you cannot supply the mdb then provide code snippets in your post.

CodeMaster::cool:

paradox_nz
09-01-2008, 02:08 AM
i thought the files are already there , i am still a new how can i provide the mdb version ?

DCrake
09-01-2008, 02:15 AM
I stand corrected I do not have A2007 on my machine and as it did not recognise the file extension the icon was misleading. Sorry about that.

If the situation could be created in an earlier version that would lead to a larger readership.

paradox_nz
09-01-2008, 02:25 AM
this is a 2003 copy , not sure how u will find the mde file in 2003 virsion .

DCrake
09-01-2008, 02:55 AM
The 2003 copies you attached still have an AccDb extension and as such cannot be opended in Access 2003. When you save them make sure they have an mdb extension.

paradox_nz
09-01-2008, 03:02 AM
sorry for that . here the extension mdb

DCrake
09-01-2008, 04:08 AM
The answer to part 1 is

Action 1:
You need to declare the returning parameter type to the function SpecialFall

Action 2:
Place the following code within the function

If intIncidentType <> 1 Then
Select Case intHour
Case 22, 23, 0, 1, 2, 3, 4, 5, 6, 7
If blnStaffPresent = False Then
SpecialFall = True
Exit Function
End If
End Select
End If

The logic being

Is it a fall type incident
What time of day did it occur
Was there a member of staff present

True will only be returned if it was a fall type incident and it occured between 2200hrs and 0759hrs and there was no member of staff present.

paradox_nz
09-01-2008, 04:36 AM
thanks alot man
but did u mean

If intIncidentType = 1 Then
instead of
If intIncidentType <> 1 Then

DCrake
09-01-2008, 04:46 AM
Yes you are correct if intIncidentType = 1 Then