Welcome to Dream.In.Code
Getting VB Help is Easy!

Join 136,542 VB Programmers for FREE! Get instant access to thousands of VB experts, tutorials, code snippets, and more! There are 1,848 people online right now. Registration is fast and FREE... Join Now!




SEARCH BUTTON

 
Reply to this topicStart new topic

SEARCH BUTTON, HOW O I DISPLAY INFO FROM A WORKSHEET ON A USERFORM?

ALVINCHAAND
17 Aug, 2008 - 11:41 AM
Post #1

New D.I.C Head
*

Joined: 17 Aug, 2008
Posts: 18

3. ALSO I HAVE A SEARCH FUNCTION WHERE THE USER IS ALLOWED TO CHOOSE THE INFO OF THE PERSON HE WANTS TO VIEW BY DOING A NAME AND COUNTRY SEARCH....HOW CAN I CALL THE INFO FROM THE WKSHEET AND DISPLAY THE APPROPRIATE INFO IN A USERFORM? SAY IN A COMBOBOX?
User is offlineProfile CardPM
+Quote Post

PsychoCoder
RE: SEARCH BUTTON
17 Aug, 2008 - 11:42 AM
Post #2

using DIC.Core;
Group Icon

Joined: 26 Jul, 2007
Posts: 8,997



Thanked: 125 times
Dream Kudos: 8625
Expert In: VB, VB.Net, C#, SQL, ASP, ASP.Net, Web Development, HTML, CSS, Win32 API, Javascript, mySQL, J#, Boo.Net

My Contributions
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.
User is online!Profile CardPM
+Quote Post

ALVINCHAAND
RE: SEARCH BUTTON
21 Aug, 2008 - 06:06 AM
Post #3

New D.I.C Head
*

Joined: 17 Aug, 2008
Posts: 18

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




User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 12/2/08 10:41PM

Live VB Help!

VB Tutorials

Reference Sheets

VB Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month