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

Display auto numbers in textbox in VB

24
please solve my problem and give me the code
Jan 4 '08 #1
10 6512
jamesd0142
469 256MB
I'm sure someone including me, would help, if you could give some additional details...

What are you trying to occomplish?
What version of vb.
What exaclty do you mean by autonumber in a textbox?
Jan 4 '08 #2
lotus18
866 512MB
please solve my problem and give me the code
Can you show us what have you done so far?
Jan 4 '08 #3
daniel aristidou
491 256MB
Is this a school project or something similar?
if so we will help you not give ready code
Jan 4 '08 #4
arali
24
i want to do this
input no.15 Name.--------------

address.-----------------------
now i want to do this when i open form it atumatically show me the current input no and other fields remain blank so i can input data to these fieldes.when i done this and click save button.it atumatically diplays next input number and other fieldes remain blank.this is my school project.iam using vb 6
Jan 5 '08 #5
CyberSoftHari
487 Expert 256MB
Doing homework is prohibited and you have to try your self. I suggest you to read posting guidelines. Describe you problem detail (you have to ask your query along with what you tried.)
Jan 5 '08 #6
creative1
274 100+
But we can him how it can be done .
Jan 5 '08 #7
CyberSoftHari
487 Expert 256MB
1. Call the method which will get max(Inputnumber) + 1 from the database and show it in textbox at form load.
2. Other textboxes like textboxName.Text = “”
3. Call the above (same) method in save command click event after insert query.
Note: Assuming solution will point in wrong direction. He/She should explain the problem detail with front-end and back-end.
Jan 5 '08 #8
arali
24
1. Call the method which will get max(Inputnumber) + 1 from the database and show it in textbox at form load.
2. Other textboxes like textboxName.Text = “”
3. Call the above (same) method in save command click event after insert query.
Note: Assuming solution will point in wrong direction. He/She should explain the problem detail with front-end and back-end.
I have access at back end and vb at front end
now please till me how to do this

inputno.15 name.
age. address.

now when i open the form it shows me just input no and other remains blanck
Jan 7 '08 #9
werks
220 100+

inputno.15 name.
age. address.

now when i open the form it shows me just input no and other remains blanck

Hi there, arali!

Just get the RecordCount and add it by 1.

Expand|Select|Wrap|Line Numbers
  1. Dim adoNum as New Adodb.Recordset
  2. Set adoNum = New Adodb.Recordcount
  3.  
  4. adoNum.Open "SELECT * FROM tblData",CoNN,3,3
  5.  
  6. txtInputNo.Text =  adoNum.Recordcount + 1
  7.  
  8. adoNum.Close
  9. Set adoNum = Nothing
Hope this will help ^^


Better Than Yesterday (-.-)
Jan 8 '08 #10
arali
24
Hi there, arali!

Just get the RecordCount and add it by 1.

Expand|Select|Wrap|Line Numbers
  1. Dim adoNum as New Adodb.Recordset
  2. Set adoNum = New Adodb.Recordcount
  3.  
  4. adoNum.Open "SELECT * FROM tblData",CoNN,3,3
  5.  
  6. txtInputNo.Text =  adoNum.Recordcount + 1
  7.  
  8. adoNum.Close
  9. Set adoNum = Nothing
Hope this will help ^^


Better Than Yesterday (-.-)




thank for your help
Now i use data connection to connect Access database
and Add two commands
One command is based on SQL Query
select max(input no) +1 from mytable
I bind this command to textbox Now it show me the next inputno
And the second command is use d for the table other fields
the point is all the fields is of the same table including inputno ,but using two commands .
now tell me how i write codding for Save button.So it can store inputno and other fields data.
name of connection is connection1
And name command are command1,command2.
Thank you iam waiting for your kind response.

Regards
<<Arali>>
Jan 17 '08 #11

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

Similar topics

5
by: sparks | last post by:
After trying a combo box to do this. its tied to a lookup table name value yes 1 no 0 they wanted to be able to type in a 1 but display a yes in the field. and store a 1 in the...
0
by: Alex Moskalyuk | last post by:
I am using System.Windows.Forms.TextBox to publish some real-time data that's coming off the external devices. My data is fed into the TextBox with proper precautions not to exceed the MaxSize...
3
by: Chris | last post by:
Before I started to create table, etc to track unique form field record number assigments I thought I'd check to see if there is now a better way to do this in .NET. I have a parent form (table)...
0
by: 23s | last post by:
Is there any way I can send a vertical value to a form's scroll position? I have a full-screen form that, at launch, contains an empty tab sheet. At run time, the user can dynamically append a...
2
by: Mamatha | last post by:
Hi I want to add an icon to the textbox's text. I don't know how to display icon in textbox in VB.NET. If any one knows please let me know. Thanks in advance. Mamatha
3
by: abc my vclass | last post by:
My win-form have many numericupdown controls to applied. But numericupdown control don't like textbox, text box control can automatic selected text when got focus. Is there any method can let me...
1
by: jason.teen | last post by:
Hi, Curerntly I have designed my table in MS Access with a column of "RuleID" and is set to (autonumber) tblRule: RuleID | Name ------------------------------- 1 ...
13
by: S.Dickson | last post by:
I had an access database that i use as an ordering system. I have a form for entering customer details. When i add a new customer on the form the customer number is an auto number that appears when...
3
by: =?Utf-8?B?UGF1bA==?= | last post by:
Hi I have a webform with several entry boxes and the user enters numbers in each box. I keep a running total (just adds all of the entries together) but am posting back to the server to do this. ...
14
by: confusedfusion | last post by:
Not sure how many form submissions that have been lost over the years before I started but the company has a contact form that the required fields when validation fails the error message is going...
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...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
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...
1
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...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.