I need your help once again.
I have a query with two fields (Language and Team)
I need a public function that will help me populate the Team field based on the Language field.
For example if Language = "WO", then the function should return "Team1" for the Team field. If Language = "FR", then "Team2"... etc
This is what I have so far:
Obviously, this code does not work. But, I have no clue where to add what is missing... maybe a declaration or a formula to indicate the Team and Language fields in the argument.Public Function get_team(Lang) As String Select Case Lang Case "WO" get_team = "Team1" Case Else get_team = "LastTeam" End Select End Function
Thx in advance for any help provided
_________________
Regards,
nrage21
Try
AlanSelect Case Lang.value
Alan
Click the * below to say thanks.
Database Principles
Pivot Table Tips
Good Excel Video Tutorials
Sumifs or SumProduct
DataPig Access Tutorials
MS Query Tutorial
Worst Pie Chart Ever?
Your post does not comply with Rule 5 of our Forum RULES. We have Seven question forums: Miscellaneous, General, Programming, Worksheet Functions, Charting, Excel 2007 Help and New Users. Please choose the appropriate forum, and post your question in ONLY one forum.
Hope that helps.
RoyUK
--------
If you are pleased with a member's answer then use the Star icon to rate it, if you are pleased enough to part with cash consider a donation to Children in Need
For Excel Tips & Solutions, free examples and tutorials why not check out my downloads
New members please read & follow the Forum Rules
Remember to mark your questions Solved and rate the answer(s)
??? I read rule #5... how did I violated the rule???? I didn't post this question is another forum and I did post it in the correct forum "Access Programming". Isn't a public function VBA code???
_________________
Regards,
nrage21
I have been holding out on posting on this because there was a post by RoyUK. I couldn't figure out why either tbh.
I pm'd roy. Waiting for a response.
Last edited by split_atom18; 12-10-2010 at 10:02 AM.
"I am not a rocket scientist, I am a nuclear engineer." - Split_atom18
If my advice has been helpful to you, then please help me by clicking on the "Star" and adding to my reputation, Thanks!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks