QUOTE(PsychoCoder @ 21 Aug, 2008 - 03:00 PM)

Dream.In.Code has a policy by which we prefer to see a good faith effort on your part before providing source code for homework assignments. Please post the code you have written in an effort to resolve the problem, and our members would be happy to provide some guidance. Be sure to include a description of any errors you are encountering as well.
Please post like this:

Thank you for helping us helping you.
Hi,
I have 2 workbooks. wkbk1 with various surnames and countries...
wkbk2 with detailed info on those people...eg tel address dateofbirh etc
I have 2 types of users accessing these workbks. Admin who has the rights to search, view and Update
AND user who can only search and view
Now how do i achieve the following:
1- when a user/admin does a SEARCH by surname & country of origin,how do i call the data from wkbk1 to be viewed in a userform according to search matches in a drop down menu?? EG SHOW items from the wkbk1 "SINGAPORE_TAN.xls sheet which holds all the full names of TAN(surnamed pple)
EG when user selects the particular tan he wants to view EG selects tan maylee , he is directed to the "SINGAPORE_TAN_MAYLEE.xls" and is able to view the data
when the admin does the same...as in when he selcts Tan Maylee he is shown a prompt where he can choose to update the items displayed via a userform which updates the SINGAPORE_TAN_MAYLEE.xls sheet.2-allow the sharing of the same wkbks between users n admin but allow only the admin to be able to edit and update info?
Any help will be greatly appreciated! Thank you in advance for any help rendered.
[code]
Private Sub CMD_MM_Click()
Unload Me
1_MAIN_MENU.Show
End Sub
Private Sub COORIGIN_COMBO_Click()
COORIGIN_COMBO.DropDown 'takes value from sheet1 in excel spreadsheet.-->rowsource
End Sub
Private Sub SN_COMBO_CLICK()
SN_COMBO.DropDown 'takes value from sheet1 in excel spreadsheet.-->rowsource
End Sub
Private Sub CMD_SEARCH_Click()
'to allow the search button to match criteria with that available in DB
'Sheets("SINGAPORE_LIM").Select 'TO OPEN THIS PARTICULAR SHEET IF SEARCH CRITERIA MATCHED
Unload Me
'Check if user left it blank
If Me.SN_COMBO.Value = "" Then
MsgBox "Please select the SURNAME", vbExclamation
Me.SN_COMBO.SetFocus
Exit Sub
End If
'Check if user left it blank
If Me.COORIGIN_COMBO.Value = "" Then
MsgBox "Please select the Country of Origin", vbExclamation
Me.COORIGIN_COMBO.SetFocus
Exit Sub
End If
'IF POSSIBLE CALL DATA FROM XLS AND DISPLAY IN DATA VIEW USERFORM...
'if criteria matches the following then open the particular spreadsheet
If SN_COMBO.Value = "LIM" And COORIGIN_COMBO.Value = "SINGAPORE" Then
Sheets("SINGAPORE_LIM").Select
End If
If SN_COMBO.Value = "TAN" And COORIGIN_COMBO.Value = "SINGAPORE" Then
Sheets("SINGAPORE_TAN").Select
End If
If SN_COMBO.Value = "SINGH" And COORIGIN_COMBO.Value = "INDIA" Then
Sheets("INDIA_SINGH").Select
End If
If SN_COMBO.Value = "CHABBRA" And COORIGIN_COMBO.Value = "INDIA" Then
Sheets("INDIA_cHABBRA").Select
End If
End Sub