how to medual Basic grades

alwazeer

Registered User.
Local time
Today, 08:59
Joined
Nov 9, 2011
Messages
36
Hi all

I'm not well versed in Visual Basic programming
---
i have numbers from 1 to 100 Divided into groups

From 1 to 5
6 to 10
11 to 25
etc ...

what i need :

When I pass No. 1, for example, should gives me"
First Basic A
No. 2 : First Basic B
No. 3 : First Basic C
No. 4 : First Basic D
No. 5 : First Basic E

When I pass No. 6, for example, should gives me"
Second Basic A
No. 7 : Second Basic B
No. 8 : Second Basic C
No. 9 : Second Basic D
No. 10 : Second Basic E
Etc ...


hope that I explained my need

thanks
 
I was curious how long this would take but I would not have written it in full without the autofill abilities of Excel
Code:
Function Generator()
   Dim Prefix(20) As String
   Dim n As Integer, i As Integer
   
   Prefix(0) = "1st"
   Prefix(1) = "2nd"
   Prefix(2) = "3rd"
   Prefix(3) = "4th"
   Prefix(4) = "5th"
   Prefix(5) = "6th"
   Prefix(6) = "7th"
   Prefix(7) = "8th"
   Prefix(8) = "9th"
   Prefix(9) = "10th"
   Prefix(10) = "11th"
   Prefix(11) = "12th"
   Prefix(12) = "13th"
   Prefix(13) = "14th"
   Prefix(14) = "15th"
   Prefix(15) = "16th"
   Prefix(16) = "17th"
   Prefix(17) = "18th"
   Prefix(18) = "19th"
   Prefix(19) = "20th"
   
   For i = 1 To 100
      n = (i - 1) \ 5
      Select Case (i Mod 5)
         Case 0
            Debug.Print Prefix(n) & " Basic E"
         Case 1
            Debug.Print Prefix(n) & " Basic A"
         Case 2
            Debug.Print Prefix(n) & " Basic B"
         Case 3
            Debug.Print Prefix(n) & " Basic C"
         Case 4
            Debug.Print Prefix(n) & " Basic D"
      End Select
   Next i

End Function
 
I'm not well versed in Visual Basic programming
:)

Thanks But How To use this in Form or report?
waiting 4 ur answer
 
You tell me. When the form opens? When a button on the form is clicked? 2 minutes after opening the form?

In other words, put the code in an appropriate event depending on what YOU want to happen.

If it is when you click a button on the form, put the code in the OnClick event. If it is in the form's open event then put it there.
 
I don't know how to do it !!!

Could Y please do it in a small db and attach it ,

Thank y very match
 
or in a query

GradePosition:choose(mynum\5,"First","Second","Third"...."Twentieth") & " basic " choose((mynum mod 5)+1,"A","B"..."E")
 
Thanks Mr CJ London
But this does not serve me
waiting for mr cronk
 

Users who are viewing this thread

Back
Top Bottom