QUOTE(PsychoCoder @ 17 Aug, 2008 - 12:42 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 thank you once again for any help rendered. Pls note i m a beginner at VB...only have very basic knowledge and this is my first assignment. it will be helpful if you can guide me along
PROBLEM DESCRIPTION
'USER IS ABLE TO SEARCH FOR USER BY SURNAME AND COUNTRY OF ORIGIN
IF SEARCH CRITERIA IS MATCHED, I WANT TO BE ABLE TO DISPLAY IT IN A COMBO BOX IN A NEW FORM(DATA_VIEW)
WHERE USER CAN SEE ALL PEOPLE WITH THAT SURNAME AND SELECT ONE PARTICULAR ONE HE WISHES TO VIEW. E.G. KING SINGH
WHEN HE CLICKS ON THE SELECTED ONE, HE WILL BE DIRECTED TO THE EXCEL SPREADSHEET(KINGSINGH.XLS) WHICH HOLDS ALL INFO ABT THAT PERSON
[code]
Private Sub COORIGIN_COMBO_Click()
COORIGIN_COMBO.DropDown
End Sub
Private Sub VT_COMBO_CLICK()
VT_COMBO.DropDown
End Sub
Private Sub CMD_SEARCH_Click()
'to allow the search button to match criteria with that available in DB
'Sheets("India").Select
'Check if user left it blank
If Me.VT_COMBO.Value = "" Then
MsgBox "Please select the SURNAME", vbExclamation
Me.VT_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 criteria matches the following then open the particular spreadsheet
If VT_COMBO.Value = "Singh" And COORIGIN_COMBO.Value = "INDIA" Then
Sheets("INDIA").Select
End If
If VT_COMBO.Value = "LIM" And COORIGIN_COMBO.Value = "CHINA" Then
Sheets("CHINA").Select
End If
Unload Me
End Sub