473,320 Members | 1,939 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Vb-to Access Data With A Particular Unique Id/no

Dear all,

I am having a .mdb database, in which following fields are there:-
USER ID :-
FORM NO :-
NAME:-
ADDRESS :-
CITY :-
ZIP :-
CONTACT NO :-

I WANTED TO CREATE A SOFTWARE IN VB, Where i can search name address and city thru USER id or form no.
Requesting you to kindly guide me how to write code for this.

Regards
Anup
May 3 '07 #1
2 1054
hi,

Plz help me...I am in urgent need of this thing..
May 4 '07 #2
Dear all,

I am having a .mdb database, in which following fields are there:-
USER ID :-
FORM NO :-
NAME:-
ADDRESS :-
CITY :-
ZIP :-
CONTACT NO :-

I WANTED TO CREATE A SOFTWARE IN VB, Where i can search name address and city thru USER id or form no.
Requesting you to kindly guide me how to write code for this.

Regards
Anup
hi,
here is the sample code to demonstrate how to retrieve data from table
I assume that that UserId or FormNo both are Unique Key.
Expand|Select|Wrap|Line Numbers
  1.  
  2. Dim rsTemp As New ADODB.Recordset
  3.  Dim conTemp As New ADODB.Connection
  4.  
  5.  If rsTemp.State = adStateOpen Then rsTemp.Close
  6.  rsTemp.Open "Select * from [TABLE NAME] where formNo=' " & txtformNo.Text  &  " ' ", conTemp, adOpenDynamic, adLockOptimistic
  7.  If rsTemp.RecordCount > 0 Then
  8.     txtName.text=rsTemp.fields("Name").values
  9.     txtAddress.text=rsTemp.fields("ADDRESS").values
  10.     txtCITY.text=rsTemp.fields("CITY").values
  11.  Else
  12.   ' message display record Not found
  13.   End If
  14.  
May 4 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: DKJ | last post by:
Is VBA wholly and completely a subset of VB.net? Are there any objects or methods or coding techniques that one could learn in VBA that wouldn't also apply in VB.net? So if I will have learned...
1
by: Vijay | last post by:
Hi, I do have the VB.NET method which has delegate as parameter. I am calling this method from VB.NET project by using the commnad "Addressof( Function name which has same signature)". How can i...
3
by: Ed Crowley | last post by:
Is there a way of populating the description field from the comments in VB.NET?
3
by: feng | last post by:
Hi, I heard that since VS.Net 2003, there is a tool available for VB.Net that I can use to create XML comment, just like I can do under C#. Does anyone know where I can find this tool? Thanks
2
by: JH | last post by:
In C# you can use /// to put comments and then create and XML documentation by going to Tools/Build web comments. Can you do this in VB.NET ? If not what Plugins do I need? Any help is...
64
by: Milan | last post by:
Hello, I would like to ask you this question. I am experienced in programming in VBA and I want to upgrade my knowledge to Visual Studio 2005 now. I hesitate whether to aim to VB or C#. Since I...
2
by: Wilson | last post by:
Dear friends, What is the difference between VB.NET and VB? Is visual studio 2005 and .NET different? thanks in advance Wilson
4
by: dbahooker | last post by:
I don't understand why there are THREE different newsgroups and there is only one 'VB'. that is VB 2005. WHY? microsoft.public.dotnet.vb.general microsoft.public.dotnet.languages.vb...
11
by: =?Utf-8?B?UGV0ZXI=?= | last post by:
I have seen the terms Visual Basic 2005 and VB.NET. It seems that sometimes they seem to be referring to the same thing but sometimes they are not. I also run into terms like VB9 and VB10.
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.