BullHalseyUSN
Technical User
Greetings!
I have a form which enters information on members into our database.
I am attempting to generate a datum called "SALUTATION" which is a member's Rank or Rate/Rating and name. The rules for this become extremely complicated. Let's start simple. For example, "BM2 Smith"
BM is a RATE, which is a person's job.
2 is a RATING, which is a person's seniority.
SMITH, well, you know that Smith is the guy's name!
I currently have the following:
Private Sub SocialSecurityNumber_AfterUpdate()
[SALUTATION] = Me![CmbRate].Column(1) & " " & Me![CmbRankOrRating].Column(1) & " " & Me![Name]
Forms![frmtblSailors].[DeptId].SetFocus
Me.Refresh
End Sub
Which gets me:
BME5 Smith
Why? Because CmbRate drops down all the various RATES. CmbRankorRating drops down the various RANKS (officers) and RATINGS (seniority of enlisted persons).
Where does "5" come from? RATINGS run E1 to E9.
I need to stuff the following logic into this concatenation in order to get this important result:
An E1 needs to be displayed as SR (for “Seaman Recruit”). So, we’d have BMSR Smith
E2 = SA (“BMSA”)
E3 = SN (“BMSN”)
E4 = 3 (for “Third Class”, so “BM3”)
E5 = 2 (“BM2”)
E6 = 1 (“BM1”)
E7 = C (for “Chief”, so “BMC”)
E8 = CS (for “Senior Chief”, so “BMCS”)
E9 = CM (for “Master Chief”, so “BMMC”)
Lastly, and perhaps for another day, if the user chooses one of the officer designations from the CmbRankOrRating (Ensign, LTJG, LT, LCDR, CDR, CAPT) then he shouldn’t be allowed to choose a RATE because officers don’t have ‘em!
Can anyone be so kind as to provide guidance on how I can attack this sticky mess?
Many thanks! BH
I have a form which enters information on members into our database.
I am attempting to generate a datum called "SALUTATION" which is a member's Rank or Rate/Rating and name. The rules for this become extremely complicated. Let's start simple. For example, "BM2 Smith"
BM is a RATE, which is a person's job.
2 is a RATING, which is a person's seniority.
SMITH, well, you know that Smith is the guy's name!
I currently have the following:
Private Sub SocialSecurityNumber_AfterUpdate()
[SALUTATION] = Me![CmbRate].Column(1) & " " & Me![CmbRankOrRating].Column(1) & " " & Me![Name]
Forms![frmtblSailors].[DeptId].SetFocus
Me.Refresh
End Sub
Which gets me:
BME5 Smith
Why? Because CmbRate drops down all the various RATES. CmbRankorRating drops down the various RANKS (officers) and RATINGS (seniority of enlisted persons).
Where does "5" come from? RATINGS run E1 to E9.
I need to stuff the following logic into this concatenation in order to get this important result:
An E1 needs to be displayed as SR (for “Seaman Recruit”). So, we’d have BMSR Smith
E2 = SA (“BMSA”)
E3 = SN (“BMSN”)
E4 = 3 (for “Third Class”, so “BM3”)
E5 = 2 (“BM2”)
E6 = 1 (“BM1”)
E7 = C (for “Chief”, so “BMC”)
E8 = CS (for “Senior Chief”, so “BMCS”)
E9 = CM (for “Master Chief”, so “BMMC”)
Lastly, and perhaps for another day, if the user chooses one of the officer designations from the CmbRankOrRating (Ensign, LTJG, LT, LCDR, CDR, CAPT) then he shouldn’t be allowed to choose a RATE because officers don’t have ‘em!
Can anyone be so kind as to provide guidance on how I can attack this sticky mess?
Many thanks! BH