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

DATAENVIRONMENT designer in visual basic 6? FORMATTING?

26
Expand|Select|Wrap|Line Numbers
  1. Private Sub add_Click()
  2.  
  3. dt1.rsCommand1.AddNew
  4.  
  5. t1.Text = t2.Text + 1 ' << HELP ME HERE!!! I STARTED 000001.. 
  6. IF I CLICK ADD COMMAND BUTTON, 
  7. SO IT MUST BE 000002 NOT ONLY NUMBER 2.
  8. ' BECAUSE I ONLY KNOW ADDING STYLE 1,2,3,4... 
  9. SO ON AND SO FORT.
  10.  ' I WANT LIKE THIS FORMAT OF ADDING - 000001,000002,000003...
  11. SO ON AND SO FORT..(AUTONUMBER)
  12. ' WHAT SHOULD I DO? THANKS IN ADVANCE...
  13.  
  14. ' NOTE: I'M USING DATAENVIRONMENT DESIGNER.. 
  15. NOT ADODC, DAO OR A MODULE...
  16.  
  17.  'IF YOU HAVE PROBLEM IN RUNNING MY PROGRAM TRY TO 
  18. SET THE CONNECTION OF DATAENVIRONMENT..
  19.  'DOBLE CLICK(DT1)RIGHT CLICK (CONNECTION)FIND (PROPERTIES) 
  20. THEN CHANGE THE CONNECTION STRING.. 
  21. LOCATED IN MY FOLDER NAMED DATABASE2.MDB
  22.  
  23. 'THANKS AGAIN..FOR HELPING..
  24.  
  25.  
  26. "YOU CAN SEE MY FORM BELOW IN ATTACHMENTS,
  27.  IF YOU DONT UNDERSTAND THANKS? 
  28.  
  29. SCAN FIRST BEFORE EXTRACTING!!!"
  30.  
  31.  
  32. End Sub
  33.  
  34. Private Sub save_Click()
  35.  
  36. dt1.rsCommand1.Update
  37.  
  38. t2.Text = Val(t1.Text)
  39.  
  40. End Sub
  41.  
  42. Private Sub delete_Click()
  43.  
  44. dt1.rsCommand1.delete
  45.  
  46. End Sub
  47.  
  48. Private Sub previous_Click()
  49.  
  50. dt1.rsCommand1.MovePrevious
  51.  
  52. End Sub
  53.  
  54. Private Sub next_Click()
  55. dt1.rsCommand1.MoveNext
  56. End Sub
  57. Private Sub Form_Load()
  58.  
  59. dt1.rsCommand1.MoveLast
  60.  
  61. t2.Text = t1.Text
  62. End Sub
  63.  
Attached Files
File Type: zip vb6 problem.zip (18.7 KB, 81 views)
Dec 14 '09 #1
4 1806
debasisdas
8,127 Expert 4TB
Have you tried to use the Format function ?
Dec 14 '09 #2
psyvanz
26
yes... but if i add code= val(text2.text) + 000001 it will not give the 000002 else it goes only "2" like 1 + 1=2, thats the matter?
Dec 16 '09 #3
debasisdas
8,127 Expert 4TB
You need to format the values after adding not before that.
Dec 16 '09 #4
psyvanz
26
@debasisdas
sir, is it in the DATAFORMAT OF A TEXTBOX; i've tried it nothing really works...

sir, if you know the code of this formatting an autonumber; kindly post here...

autonumber... must start in 000001, 000002, 000003.....so on and so fort....

YOU CAN USE 1 TEXT BOX AND 1 COMMAND BUTTON... THAT EVERYTIME, YOU CLICK THE COMMAND BUTTON IT WILL ADD... AND IF YOU UNLOAD IT... AND RUN AGAIN, IT WILL START TO THE LAST NUMBER.. LIKE THIS

TEXT1.TEXT = 000001
CLICK THE COMMAND BUTTON= 000002
NEXT CLICK COMMAND BUTTON=000003... SO ON AND SO FORT
WHEN YOU UNLOAD THE FORM... AND THEN RE-RUN... IT WILL START IN 000003..
AND IF YOU CLICK THE COMMAND BUTTON AGAIN= 000004


thx in advance.... i just want the code.... i think, this is the right way... to solve my problem.... i know you dont want to download my attachment but.... thats the only way you can help me... to know deeply my problem.... JUST SCAN IT SIR IF YOU AFRAID IN VIRUSES... BEFORE EXTRACTING...
Dec 17 '09 #5

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

Similar topics

0
by: Ray | last post by:
Date problem. Using non American date formats with Microsoft Access and Visual Basic. I set my regional settings to English(Ireland) or English(United Kingdom) and my date appears in Access as...
17
by: Lloyd Sheen | last post by:
This IDE is driving me nuts. I needed another button so I copied an existing one, changed the Text and the id and position by drag and drop. Well then I run and get the following: Control...
1
by: Rado | last post by:
Hello. I have One problem. Whan I make database program in Visual Basic 6 which has some Forms. I make Dataenvironment. There I make connection to my database. In command I select table or write...
1
by: BraveHeart | last post by:
Hi everyone ! How i can use DataEnvironment in VB.NET ? Thanh you very much .
2
by: Allcomp | last post by:
Hello, I am trying to learn how to work in Visual Studio .Net 2005 and after searching for a lot, I don't see any answer. Actually, In VB6 I use the dataenvironment. For my application, I...
1
by: Nathan Sokalski | last post by:
Visual Studio 2005 unexpectedly stopped generating the *.designer.vb files for *.aspx and *.ascx files. After a few days of frustration trying to fix this, I noticed that it had the following...
4
by: Goran Djuranovic | last post by:
Hi all, I am experiencing a strange thing happening with a "designer.vb" page. Controls I manually declare in this page are automatically deleted after I drop another control on a ".aspx" page. -...
1
by: MaryKJolly | last post by:
I got this sample project from a website. But there is some syntax error in the statement which contains the CDate function. I can't detect the error? Can enybody help me? SUMMARY This article...
1
by: psyvanz | last post by:
HOW TO MAKE A STUDENT SCHOOL SUBJECTS IN COLLEGE USING Visual Basic 6? WITH FIXED SUBJECTS AND ASSIGNING THE SUBJECT TO A STUDENT USING "DATAENVIRONMENT"? THIS IS IN "FORM1" THIS IS IN...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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
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.