|
-
April 2nd, 2001, 02:52 PM
#1
Control Break processing
I need to know how to enter a new headline every time the first field in a ListBox changes.
My output looks like this:
1 56743 $1200
1 64564 $5400
2 56456 $7853
3 98798 $5645
3 54564 $5456
4 98798 $5645
ETC..
SO how do I enter a new headline any time the 1,2,3 or 4 change.
This is being displayed in A LISTBOX.
Thanks,
Ben
-
April 3rd, 2001, 01:47 AM
#2
Re: Control Break processing
What do you mean with headline? Do you need to add a new line in your listbox and have it in first position?
Special thanks to Lothar "the Great" Haensler. Come back soon, you Guru.
...at present time, using mainly Net 4.0, Vs 2010
Special thanks to Lothar "the Great" Haensler, Chris Eastwood , dr_Michael, ClearCode, Iouri and
all the other wonderful people who made and make Codeguru a great place.
Come back soon, you Gurus.
-
April 3rd, 2001, 10:34 AM
#3
Re: Control Break processing
Sorry, I mean I want to Add a new Header like:
JOB CODE EMP NUMBER SALARY etc..
Any time the first field which is job code changes.
-
April 4th, 2001, 02:21 AM
#4
Re: Control Break processing
If matter is to put a line in first position of listbox, you can try this code:
Dim i As Integer
For i = 0 To 3
List1.AddItem i 'just to put some data
Next i
'now insert a new first line:
List1.AddItem "job,code,match", 0 'where 0 is the index position, which means: as first row.
If you want this to work each time something change, you should put the
list1.additem "job, etc",0
instruction in the event where you make the list1 values to change.
To look for modified first column values (remember you're testing a string) you should store values in an array (just first column value) and test if new values differs from old ones:
for i= 1 to list1.listcount-1
if left(list1.list(i),1)<> myoldvalue(i) then 'suppose your first column is only 1 char len
'something changed
'redraw line you need,
'refresh your "myoldvalue" array
end if
next i
This is only an example, you should work on this to make it suite you.
Special thanks to Lothar "the Great" Haensler. Come back soon, you Guru.
...at present time, using mainly Net 4.0, Vs 2010
Special thanks to Lothar "the Great" Haensler, Chris Eastwood , dr_Michael, ClearCode, Iouri and
all the other wonderful people who made and make Codeguru a great place.
Come back soon, you Gurus.
-
April 4th, 2001, 07:27 AM
#5
Re: Control Break processing
Thank You I believe this will work!!!!!
-
April 4th, 2001, 07:32 AM
#6
Re: Control Break processing
Good. If it is not enough, post a new question, and name it:
"listbox question"
as "control break process" seems a little confusing...
Best regards,
Cesare Imperiali
Special thanks to Lothar "the Great" Haensler. Come back soon, you Guru.
...at present time, using mainly Net 4.0, Vs 2010
Special thanks to Lothar "the Great" Haensler, Chris Eastwood , dr_Michael, ClearCode, Iouri and
all the other wonderful people who made and make Codeguru a great place.
Come back soon, you Gurus.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|