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

numbering data problem

22
hi experts..

i would like to store several data in one field in ms access. i use this code to split and numbering the data..
Expand|Select|Wrap|Line Numbers
  1. Dim lines() As String, ixx As Integer
  2.  
  3.     lines() = Split(Text1.Text, ",")
  4. For ixx = 0 To UBound(lines)
  5.     Text3.Text = Text3 & (ixx + 1) & ": " & lines(ixx) & vbCrLf
  6. next
  7.  
everything's going well until i store other data in the same field. the number not continue but restart to number 1.
1. visual basic
2. computer
1.mathematic

thanks for your help.
Jan 21 '13 #1

✓ answered by Rabbit

I just wanted you to be aware that any future changes will be more complicated and take more time on an unnormalized database as opposed to taking the time to do it right in the beginning.

As far as your numbering problem, if your goal is to append the data and get the numbering correct, then you need to start your numbering from the original number plus 1. You can get that by splitting the original data and getting the number of elements in the resulting array.

12 1364
Rabbit
12,516 Expert Mod 8TB
You should not store more than one piece of data in a field. That breaks the rules of normalization.
Jan 21 '13 #2
mdtam
22
even memo in ms access?i put them under January field so when i choose January at combobox,data report will shows the data.i use one table only.any idea?
Jan 22 '13 #3
Rabbit
12,516 Expert Mod 8TB
Even in a memo field. You shouldn't even have a January field. It's hard to help without knowing anything about the design and purpose of your database.
Jan 22 '13 #4
mdtam
22
PBS-KSSR.zip
here is my ms access database..each number(111,121...) holds
a statement..when the numbers being checked the statements will show in month fields(Jan,FEb..) arrange with numbering.
Jan 22 '13 #5
Rabbit
12,516 Expert Mod 8TB
As a rule of thumb, I do not download files from stranger. Please describe it in the thread instead.
Jan 22 '13 #6
zmbd
5,501 Expert Mod 4TB
As Rabbit pointed out:
A Tutorial for Access
Database Normalization and Table Structures.
Jan 22 '13 #7
mdtam
22
ok i explain in more details..
i use vb6 and msaccess 2007 with ado.In vb6, i got a combobox(Jan,Feb...) and several checkboxes labeled with 111,121,131..In my msaccess i got field of name,111,121,131...,Jan,Feb till Dec. For example when user select Jan(combobox) and 111 and 121(checkbox) in vb6 ,their statement will write in database under Jan with numbering format.If the user select again 131 in Jan,the numbering not sequence properly..that's my problem :)
Jan 22 '13 #8
Rabbit
12,516 Expert Mod 8TB
You should read those articles z linked.

As far as your design, you still haven't given us any additional detail that you haven't stated before. So I can only repeat what I've said. The design is not normalized and you should not have:

1) More than one value in a field.
2) Multiple fields for the 12 months.
Jan 22 '13 #9
mdtam
22
i know how to normalize my Database but i have to start from the beginning. Rewrite the whole code..mess with data report and everything. Since this is only my last problem i need to overcome then my program will complete..anyway thanks experts..if you have any idea about the numbering i appreciate that..thanks again.
Jan 23 '13 #10
Rabbit
12,516 Expert Mod 8TB
I just wanted you to be aware that any future changes will be more complicated and take more time on an unnormalized database as opposed to taking the time to do it right in the beginning.

As far as your numbering problem, if your goal is to append the data and get the numbering correct, then you need to start your numbering from the original number plus 1. You can get that by splitting the original data and getting the number of elements in the resulting array.
Jan 23 '13 #11
mdtam
22
thanks rabbit..you are the best..now i can compile my program..next time i will normalized my database first before start project..actually just learned programming couples of weeks ago..:)
Jan 23 '13 #12
Rabbit
12,516 Expert Mod 8TB
Glad you got it working, good luck with your project.
Jan 23 '13 #13

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

Similar topics

2
by: Sonoman | last post by:
Hello everyone: I am new to Visual Basic and I have a problem that I cannot put my finger on. I am working on a school project and I am getting some serial data from a microprocessor. I have...
11
by: Ian Bell | last post by:
Apologies for the last post; got the topic wrong. What is the current thinking on the best way to solve the shared data problem i.e. accesssing a shared variable in a non atomic way can give...
4
by: Alex Sibilev | last post by:
Hello, I have a really weird problem I've been trying to solve it without any luck for the last couple of hours :( I'm writing a "conference board" application (quite similar to ASP.NET...
1
by: QT | last post by:
Dear Sirs, I am using following codes to have a list box in form. When I run that form as a start up object, I have no problem. I have a MDI parent form which has user login feature. To...
2
by: James Radke | last post by:
Hello, I have a vb.net windows application that is calling an older DLL provided by a third party. They supplied a VB 6 application that, when run on my systemn successfully passes data to the...
3
by: Carramba | last post by:
Hi! I am working on script that ll generate some random data, ll need it later on to fil db for testing. but know to my problem, I have limited generation of data to different char_sets...
0
by: Shaileshsharma | last post by:
Hi, I am facing a problem from last few dayes.I have a Dropdownleast box which is bind with Table DrugMaster which contain around 65 Thausand Drug. When we use Selected index Change to...
0
by: db007 | last post by:
I have a problem at the moment with a web project. I have two Panels within an UpdatePanel on an aspx page (using Masterpages). I'm using ASP.Net 2.0 with an AJAX enabled website. The two...
0
by: SCARHEAD | last post by:
Bought a used VAIO no system software of any kind came with it. Created a new user profile with admin and deleted old users profile. Used the system for a few weeks updated XPpro SP2 to SP3 had some...
2
by: MJK | last post by:
Hello, I am reading a data file but when I try to print what I already read, it just prints the first line of the data correctly. From the second line, it prints 0 for integers and nothing for...
0
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...
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)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
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: 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.