Hi.I am working on a project(patient management system).I want a code for this.
Once I enter the name of the patient whose details want to know, I want the next form to be loaded and those specific details of that particular patient(already stored in a database) to be displayed in a text box.
I use Vb6 and MS access
ashwin149
0
Newbie Poster
Recommended Answers
Jump to PostTry this:
Dim con as new ADODB.Connection Dim rs As New ADODB.Recordset If txtSEARCH.Text = vbNullString Then MsgBox " The search field is empty.", vbExclamation 'Change message if you want txtSERACH.SetFocus End If With rs If .State = adStateOpen Then .Close 'TABLENAME - replace with your table …
Jump to PostI then suggest that you have a look at THIS link. It gives you everything you need on the data control.
The code will be something like -
Text1.Text = "Apple" datFood.Recordset.FindFirst "YourFoodFieldNameHere = " & Text1.Text
All 6 Replies
abelingaw
69
Posting Whiz in Training
AndreRet
526
Senior Poster
abelingaw
69
Posting Whiz in Training
AndreRet
526
Senior Poster
ashwin149
0
Newbie Poster
AndreRet
526
Senior Poster
jonsca
commented:
I guess no one in your "home" forum gives you rep.... you've earned it.
+6
Nick Evan
commented:
Thank you for helping us fight spam!
+16
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.