473,406 Members | 2,371 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,406 software developers and data experts.

visual basic newbie help!!!

I was making a program, a simple passbook, but I'm kinda new to ADODB...I have a database in MS Access.

In my program, I have to type in the account number then by pressing enter key, the name of the owner of the account number and their balance will appear on different textboxes...can anyone help me out??
Oct 21 '07 #1
1 1003
debasisdas
8,127 Expert 4TB
You simly need to open the recordset on the desired event. Pass the account number in the SQL by selecting from the textbox.

sample code

Expand|Select|Wrap|Line Numbers
  1. SqlStr ="select name ,balance from acc_table where account_number  =" & val(trim((textaccnum.text))
then assign the value of the recordset to the desired textboxes

Expand|Select|Wrap|Line Numbers
  1. txtname.text=iif(isnull(rs(0)),"",rs(0))
  2. txtbalance.text= iif(isnull(rs(0)),"",rs(0))

hope the above sample code solves your problem.
Oct 21 '07 #2

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

Similar topics

3
by: Keen | last post by:
This is my first post on this website so hi everyone and I'll introduce myself. Im 14 from Scotland and I like computer games and I have started programming not that long ago. ;) Im making a...
1
by: DhavalPatel1983 | last post by:
Hi, I need help in VB for handling Listview control. Problem Discription I have one listview control. now i want to develop one application which entered data in to listview control at...
0
by: monkeycool | last post by:
This is for my intro to computer programming class. Please help me solve these 2 assignments: For the following items, you are to write the source code solution to each problem using the...
4
by: andrew4862 | last post by:
Simple one for you guys i hope, bit of a newbie at this: i have a text box that i need to be filled in i have a statement to display a text box if it is blank which works but it still moves on to...
4
by: corky20 | last post by:
Can someone help...i've only started learning visual basic and i'm pretty new to programming(i know but everyones been there at one point) and need help with a question! A man is paid at the...
4
by: bilalbajwa2336 | last post by:
I want to make a program in visual basic. When i put my salary data in VB (like: Time In , Time Out, DAte, DAy) VB automatically (in the back ground) input this data in the Excel and Show out puts of...
1
by: Eduard Allen | last post by:
I am a newbie to this site.. Would you help me to know on how to use the Data Report in Visual Basic 6.0 properly? I have my thesis, that's why I need to learn the process on how to use it.
0
by: gwmarin | last post by:
Hello, i am a complete beginner with visual basic so lets see if i can explain my problem. I've got microsoft excel 2003 which has got Visual Basic 6.5 and i need to create a macro which will click...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.