Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




How To Have X Item Per Page But With Item < X Data


i have crystal report with group by id
can i have 12 item each id each page
in this case i have id which have <12 item
but i want each id have 12 item and if they have <12 item give blank to other until have 12 item each id
thanks alot




Edited by - albantani on 3/22/2005 5:20:56 PM




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
How To Search Listbox For Item If Item Not Found Add Item?
Hi, lol man I cant find nothing today when I search the forum.

This my latest problem, How do I search a listbox for an item lets say "Game Over" And if the item is found the program does nothing, but if the item is not found it will add "Game Over"

Thanks Again

Click Item In Listview Then Show That Item In Combo As Index = 0
Hi guys,

I have a listview (lvwUserPunchedOut) that is populated with records in a database (persons first name in one column and last name in the second column), what I am looking to do is if I select a persons name by clicking on it in the listview on frmMain, and then bring up frmSearchCriteria, i would like to show that selected name in the combobox as default (cboEmployee.ListIndex = 0) on frmSearchCriteria (the combobox is sorted = True and is also populated with first name and last name of the person)

How would this be done? Hope I make sense. Thanks in advance.

Get Table Item Value From Aspx Page
How would I go about retreiving table item (<td>) text to copy to a textbox in Visual Basic 6 from an aspx page?

for example:
i need the "3" from the following

<td colspan="2"><label class="aReportLabel">Bed </label><label class="aReportValue">3</label></td>

Add Item List To Property Page?
Hello all,
I would like to know where I should store the information entered into a property page. For instance, the Imagelist control, when you add images to the list, where and how does it store the information pertaining to the image.

I would like to add a similar feature to my control, but I'm not sure where to store the info, in the registry, in .ini file or whatever?

Any help in appreciated,
Thanx,
ziggy2004

ComboBox List/add Item, If Item Exists, Dont Add It Again!
Dudes and Dudeesses I need help!

I have a problem with a combobox within a form. I'm scanning down the spreadsheet for values and asking a combobox to .additem, however, the same value may appear twice whilst scanning down. Is there an if statement that will look and check the combobox to see if it is already added, if so dont add it again, if not, add it?

as below,

Code:
combobox.AddItem "Hotmail"
combobox.AddItem "Yahoo"
combobox.AddItem "Hotmail"
Hotmail will be added twice, how can I stop that?

If worst comes to the worst, I can sort it out with a long winded method, but I'm hoping theres a quicker way.

Thanks for all your help

Array Handling, Adding Item, Deleting Item
Hello,

I was going to build a "buffer" and thought array would be a suitable way.
when the form loads the ArrayStart is set to 0

when data is coming in it is added to the array:

MyArray(ArrayStart)= data
ArrayStart= ArrayStart + 1


Now i would like to find out whether there is any data in this array
if there is im doing something with that data

but then i would like to simply delete that data from the array

how do do this?

Pointing Mouse At Some Item On Form Causes Info About This Item To Appear???can This
my question is that when you point the mouse at some item on the form you get some info about this item to appear, like on html page or for example when you point to the message icons in vbforum page like the lightbulb symbol it tells you that it is a lightbulb...can this be done in visual basic....

Select Item In ListBox1 And Corresponding Item In ListBox2 Is Also Selected
Hi,
Hi I have two Listboxes list1 has lets say Firstname in List1 and List2 has surnames.
How do I select an item in List1 and have it's corresponding item in List2 selected as well?

So if I select Item 6 in List1, I want item6 in List2 to be selected too.

Ken

Is There Any Way To Put A Calcualted Item In A Page Field? (Pivot Table)
Is there any way to put a calcualted item in a Page Field? (Pivot Table) Excel 2002 or newer Versions

Removing An Item From A ListBox By Clicking The Item
Hi, How do you remove an item from a ListBox by simply clicking the item u want to be removed?

This is the code i tried but it doesnt work:

Private Sub list1_Click()
Dim n As Long
Dim ncount As Long

ncount = List1.ListCount - 0
For n = 0 To ncount
List1.RemoveItem (n)
Next
End Sub

Any ideas?


-Flaw

Single Item List Box (item Not Really Selecting)
Application=Access2002

The following code has worked for me in the past but won't now for some reason.
I have a private function and/or subs that performs a few simple operations such as setting listbox rowsources and simple math functions on a form. The queries set as rowsource use criteria from other single item listboxes.
Now, for some reason, the queries won't return values until the previously .selected(0) = true (single item) list boxes have been clicked on.
Problem has only been in creating a new form. Perhaps the problem did not occur in older created forms due to compatibility?


Private Sub fraEWTo_AfterUpdate()

[Edited]
    lstRotorHoursPriorTo.RowSource = "qryRotorSwapHoursTotTo" 'gets hoursprior from tblRotors
    lstRotorHoursPriorTo.Selected(0) = True ' This is one place where the problem seems to exist, the control does not function until it has been clicked on via mouse.

    LstClockInTo.RowSource = "qryRotorSwapRAHoursIPTo"
    LstClockInTo.Selected(0) = True

    txtRACHIPTo.Locked = False
    txtRACHIPTo.Value = txtClockHoursTo.Value - lstClockInTo.Value 'nor will this until the lstClockInTo box has been manually selected


A Mechanic in a Programmers shoes
Thanks




Edited by - greenfch on 12/7/2005 11:22:52 AM

Making The First Combo Box Item Always The Selected Item
Hi.

I have a combo box with a Dropdown list Style and which is invoked several times in different parts of my form. How can I make the first item in this combo box the selected item or the default item everytime I select it? Currently, what's happening is that the last item that I selected becomes the selected item the next time the combo box is invoked. Thanks for any suggestions in advance!

Can I Put A Calcualted Item In The Page Field Of A Pivot Table..Geoff You Are My Only Hope
I can not for the life of me figure out how to put a field that has a calculated item in it into the page field. Is this possible? If not, I need some more help. I have a field "Brand" if a user clicks on a specific radio button I need to count one of the brands twice. There is also a combo box that will allow the users to group by other fields. Manufacturer, State, etc. I can create the calculated item if the pivot table has Brand in the rows (This is what I call grouping). If the user chooses to group by Manufacturer how can I still double count that brand if I can not move Brand to the page field because it has a calculated item in it.

List Box Item Scrolling (Next Item)
Hello,

I was wondering what the code would be for a command button to make the next item in the list box be selected?

Kind of like a NEXT button.
EXAMPLE:
List box Line 1
List box Line 2
List box Line 3
List box Line 4

If List box Line 2 is selected then clicking the next button would DESELECT List box Line 2 and SELECT List box Line 3.

If I didn't explain enough just let me know.

Stilekid007

Solved-howto Send First Item Of Listbox Totextbox, Then Delete First Item Of Listbox?
Lol another question, how do you do this

how to send first item of listbox to textbox, then delete first item of listbox?

Thanks

Change ListBox Item Text?+ Change Item Color Or Status?
hi
I'm new to VB. I want to change the text of a ListBox item.
I used AddItem to add items.
Then I tried to change a selected item using lst.Text = "somethingNew", but it doesn't work...
Pl. help

And need to know.. how to change the color of an item or status(disable) of an item???

Thanks

Using Item Data
I'm trying to make an AIM program and I want to store the password of the user as item data. EG: The text from txtScreenname would be Added to the listbox and the item data of that text would be the password (txtPassword) for that screenname. So far I have

Code:
Option Explicit
Dim lData As String

Private Sub cmdAddToList_Click()
With lstScreennames
.AddItem txtScreenname.Text
.ItemData(.NewIndex) = txtPassword.Text
End With
End Sub

Private Sub lstScreennames_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
lblPassword.Caption = lstScreennames.ItemData(lstScreennames.ListIndex)
End Sub
but that doesn't work

Saving Item Data
how would I save data for a item editor so another program (the game itself) can interpet the file created by the item editor. I want to do this using the CDB control. Is there a command/function to save a list of data using the CDB?

Xth Data Item From A List?
Here's what I'd like to do:

I have an array of data (e.g. Monthly Shipping Costs by Month by Customer). I will also have a sum of shipping costs by customer.

I could easily sort this array by month to get the top 10 Customers by Total Shipping Cost. However, since I won't necessarily have control of this workbook, I don't want to have to do that.

I'd like to be able to show the Top 10 list even when the data changes.

For example, I could use the Large function to get the #1, #2, #n item for costs, but then how do I translate that back to a customer? I can't use the LOOKUP functions (as far as I know) because, if there's a tie, then it wouldn't return the proper customer (i.e. if Custer X and Customer Y both had $5,000 total shipping costs, how would I return the second one?). Also, the Large function returns an error if there's a tie.

Hmmmm... I'm thinking that I may need to use a VBA function for this, but I was hoping to get around that.

Does anyone have any ideas without using VBA?

Combo Box - Item Data
Problem, i have just started coding in V.B and i am setting up a username and password entry, the username box is a combo which i would like to link to an external database created in access. I have not a clue of how to code it to look to the database for the info

Second problem, how do i code so the enter button checks the entries with the database??

Any help would be great...

Cheers

Combo Box Item Data
i have a combo box which i have filled in it with a few items, for example

Do While Not rst.EOF
    cmbSupp.AddItem rst("SupplierName")
    cmbSupp.ItemData(cmbSupp.NewIndex) = rst("SupplierId")
    rst.MoveNext
Loop

in some cases i have the text which should be shown in combo box ,suppose Show_SUpplierName, i want this supplier Name and its Id be active in combox box, for text i did so:
cmbSupp.Text = rstTmp("SupplierName")

but what should i do active the supplier Id in Itemdata of Combo box?
thanks

Optionbox And Item Data In Vba
hi, im coding in word2000 vba. the problem is that in "normal" vb 6 an option drop-down-list has a mothod called "itemData". i really need this method in my word 2000 macro but it seems like "ItemData" is not available in vba!?

does anyone know how to give a value to a single entry in an option box without using the "itemData" method??

thank you

coma

Combo Box Item Data
Hi,
I've just started trying to learn a few things in visual basic but one thing that i cannot figure out how to do is to read the itemdata from a combobox that is relative to the name selected in the combo box. I inserted 10 items into the combo boxes list, then i inserted 10 pieces of data into its itemdata and now i cannot figure out how to use these datas together. I want it so that when i click on a name in the combo box it outputs the corresponding itemdata to a text box but i cannot figure out how to do it. All i get is the first item data value. Any post or help would be great. Thanks alot.

Tim Conway

Getting Item Data Index With Listbox Value
I'm trying to get the itemdata int value from a listbox using the listbox text value. For example:

populate the listbox using a query:
rst = select id, value from table

While (Not (rs.EOF))
lstbox.AddItem rst!value
lstbox.ItemData(lstbox.ListCount - 1) = rst![id]
rstSiteID.MoveNext
Wend

So what i want to do is get the "id" value from a selected
"value" in a listbox.

Any help would be appreciated.

Binding Data To A Listbox Item
Is there are way to bind data to a listbox item ?

Something like


Code:
MsgBox List1.ItemData(List1.ListIndex)
But ItemData can only be numbers... =/

And, uhm how do i split a filepath like this: C: est est.bla

At the first "" read from right to left?

Delete Item From Data Grid
Can someone tell me how to delete an selected item that is appear in data grid?

Sorting Item Data (help Debug This)
Code:
Private Sub SwapItems(plst As ListBox, a As Long, b As Long)
Dim strList As String
Dim lngItemData As Long

With plst
strList = .List(a)
.List(a) = .List(b)
.List(b) = strList
lngItemData = .ItemData(a)
.ItemData(a) = .ItemData(b)
.ItemData(b) = lngItemData(a) <----i get error here....

End With
End Sub

How To Store Data For A List Item?
I searched the forums and could not ind an answer to my question.

Basically... i would like to know how to store multiple properties along with a certain list item... for example, i want it to be able to bring up the properties of the list item i have selected.

any help would be appreciated, i am not extremely experienced.... so any info on this subject should be clearly stated.. thank you

ListView Not Displaying Item Data
I am having a little problem with a listview.

Baiscally I have a listview loading anywhere from 1 to 10,000 items and each item having up to 10 subitems. Now I can load up to 1,000 items without a problem, but when I start getting up to 4,000 items the following happens:

1. Very Slow
2. Nothing is displayed in the listview

Any suggesations would be greatly appreciated.

Bob

List View Item Data..
Hi All,

I'm trying to store a product ID in the ItemData Property of a listbox. The ID's quite often contain leading zero's. When I pull it out again, the listview has removed the leading zero's.

I need to get round this as I'm calling a stored Proceedure which requires them.

I have also stored the ID & Desc for the user to view, I figured I could search the string until I hit a semi-colon then store up until that point and parse that.

Unless anyone has any ideas can some one point me in the right direction regarding searching the string and keeping the searched items?

Thanks in advance

Combo Box / Item Data Problems
Hi Guys,

I am populating a Combo Box from a database, and then I want to fill in some textboxes depends on the name the user clicks on in the combo box.

If there is a better way to do this or a TUT please tell me.

Right now I am populating the combo box like this:

With MyRecSet
Do Until .EOF
Combo1.AddItem MyRecSet("name")
Combo1.ItemData(Combo1.NewIndex) = MyRecSet("clientID")
.MoveNext
Loop
End With

This populates the combo box, but when it is clicked on, it just returns the values of the very last entry.it also thinks the ItemData(combo1.NewIndex) value is either 1 or 12 .... which ... well there are only 6 entries in the database.

Here is my code for the fill in:

Private Sub Combo1_Click()
With MyRecSet
.MoveFirst

Do Until .EOF
If Combo1.ItemData(Combo1.NewIndex) <> MyRecSet("clientID) Then
.MoveNext
Else
txtbox.Text = MyRecSet("name")
Exit Do
End If
LOOP
End With
End Sub

Where am I messing this up?

Calling A Menu Item Using Data From A Database.
Here is what im trying to do...

In our program we keep a log of what menu items the user clicks on.
And we store it into a database. What i am trying to do is display the most recent menu items to a form as a button or something. This way the user can access their recent menu items.

FormA has a menu with about 30 menu item. It is also a MDIForm
FormB retreives the menu items from the log. This is a MDI Child.

So i want to use the menu names that i pull from the database to call the menu items on FormA. But i dont know how to do this since i cant call a string value. since that is what i get from the database. I thought about making them objects but i cant get it to work.

Any ideas or comments are appretiated!

: y0use

Data Combo Box Keeps On Selecting 1st Item When Compiled
im having problem with the data combo box, it keeps on selecting the first item even if i try to select another, it works fine on design time but after i compiled the program it goes nuts...

i placed this code to refresh the list values everytime i click it, maybe this is causing it


Code:
' remember the last selected text
tmp = mydatacombo.text
with adodc1
.refresh
end with
' reselect the last selected text
mydatacobo.text = tmp
anyone, i cant seem to find the problem, its hard to debug when its actually happening on runtime (compiled)

Needs Listview Sample To Read Item Data On Xml Doc
hi guys

I just needs your help with my client, I couldn't find a listview to read the items data on xml document. It's like this one what i wish to put on my program.......







Please if you could help me out to find the sample one which it will be great while I can adds the item data on the xml document???




Thanks in advance!

How Can We Know The Index Of An Item Data Value In A DropDownList Combo In VB6
I would like to receive help on the following described issue.

In my form I have a dropdown list combobox, which is populated with 'additem' and 'Itemdata' methods. during program execution, I know only a particular value stored in the itemdata. I dont know index and listed values.
I want to get the index corresponding to the Itemdata Value. How can i get that?

Thanking everybody,
sreeraj

Print Listview's Item Into Data Report
Hi, is there any method to display the listview items directly to the data report rather than insert those data into the database's table first?

Please give suggest for the problem.
Thanks

Get A Sub Item Of An Item On A ListView
Awhile go I used a Listview before on a project and I remember most of it. There is one thing I am having trouble with though. The list get's populated when the form is loaded. It has 2 headers "Item" and "Number". What I want to do, is when a button is pushed, msgbox the selected items number (In other words the sub item). How do I go about doing that?

Updating Fields Upon Selecting An Item In A Data Combo Box
I am currently working on a sports equipment shop system project. I have 3 tables in my MS Access DB:
1. Customers
2. Items
3. Sales
The Customers table hold details of customers, such as Name and Address.
In the Sales form, I have some fields from the Items and the Customers table. I currently have a combo box for the CustomerID and text boxes such as Name and Address. What I want to do is to update the information in the fields Name and Address automatically when the user selects a customerID from the Combo Box. I don't know what function to use, either Click or Change. And also what is the real code to use for the fields to change. I am currently using the following:

Code:
Private sub cboID_Change()
txtName.Refresh
txtAddress.Refresh
End Sub

Listboxs Pulling Data From Array On Item Select
I am working on a shopping cart like program where i open data from a text file with data that looks like this "desk chair", 79.95 and i have placed the item in a list box and the price of the item in an array called ArrayPrice now I need it to display the price of the item in a text box when the item is selected in the list box and i have no idea how to do this. The list box is called lstItems and the text box is called txtPrice. I was trying to do something with the following code although I realize that it is wrong lol


Code:
Private Sub lstItems_change()

IntTarget = lstItems.Selected
N = 0
blnFound = False
Do Until (blnFound Or (N = IntListSize))
If (IntTarget = ArrayPrice(N)) Then
blnFound = True
IntLocation = N
End If
N = N + 1
txtPrice.Text = IntTarget
Loop
If blnFound Then
txtPrice.Text = ArrayPrice(IntLocation)
End If
End Sub

I appreciate any help that I recieve on this thanks a lot in advance

Storing Extra Item Specific Data In A Listbox
I remember being able somehow to store extra data for a item in a listbox but I cant remember how to do it. Like say you have list1.additem "Whatever" and you want to store something for whatever like a definition. So when they click on whatever it brings up that definition stored in the thing. On a few controls ive used they called it the key but the listbox doesnt have one of these that I can find..?? Any help?

Make The First Item In A Data Combo Box Appear Without Pushing The Dropdown
I have a data bound combo box that is returning selected data to the user. My boss wants the first element to show up without the user having to click on the down arrow exposing all the selections in the box. Is there any way to this in code. I will appreciate any help.
Thanks

Best Way To Manage 3-d Data && How To Read Ith Item In A Line (save Memory)
I have 2 questions actually:

How to effectively manage a 3 dimensional data, like a function f that depends on x, y, z; i.e. f(x,y,z)
I want to output the data to a txt file using comma delimited (most data are numeric)

The structure in a row & column layout would look like this:


Code:
x1:

z1 z2 z3 ...
y1 f111 f112 f113
y2 f121 f122 f123
...

x2:...

...

And then, I want to read from that txt file certain rows and columns only, not all of them. Is there any way to do it without reading the whole thing in to save memory?

TIA

EDIT: I found a way for the second question: using Line Input then Split array, but don't know how to jump to a certain line (Seek is hard to use since my data length is variable in each line).

Using An Inputbox To Search DB For An Item Then Once Records Are Found Send To Data Report
I am using ADODB to connect and manipulate a DB. What I am trying to do is write code so that a user can enter any text into an input box. Then I want to search my DB and try to find the records from the text inserted by the input box. When the records are found I want to send them to data report. Is this possible?

Solved:for The Wizard Geof - Select From Item And Show Data Filtred...
In effect i want to scroll into userform the value from columns of the shseet(all tbox are identified with col_x where x is the letter of column), but:
1) Insert only unique value in combobox1 from column D ( naturally without blank cells)
2) if i select from cbox1 a value for example EXUV, permit the scroll (with scrollbar1) of value in variuos tboxes only if line is identified with EXUV...






Edited by - luca91 on 1/18/2007 3:02:14 AM

How To Add Menu Item And Sub Menu Item In Outlook
Hi
I Am Developing One Application During This Application I Am Facing One Problem.what Is That Is, I Am Explaining Every Thing Clearly.in Outlook For Example One tool Menu Item Is There In This Menu Item I Want Add One Menu Item Example mailitem.in This mailitem,i Want Add Another Two Sub Menu Items Example These Names Are mailsend And mailrecieve .
How This Shoulb Be Done In Vb6?this Is Very Urgent.
Any One Knows Please Replay Immediatly.

For Each Item In Data "count"
I was wondering if there is a counter that you can use with For Each. I did a google search with no success.


Code:
For Each Item In data
MsgBox Item
Next

Go To Next Item?
Say this is my code:

For i = 1 To myInbox.Items.Count
other code
If something=0 Then
????
End If
other code
Next i

What can I write best instead off the question marks when I want to go to the next i (the beginning of the For Next statement)? So I don't want to Exit For but ignore the rest of the code below and go further to the next item.

Add More Than 1 Item At Once
I use this command to add details to my db:
*
MyConn.Execute ("INSERT INTO [Group] ([email]) VALUES ('" & txtEmail.Text & "')")
*
Now I want to add more than one record, for example both name and email.
When I use this :
*
MyConn.Execute ("INSERT INTO [Group] ([email] , [Name]) VALUES ('" & txtEmail.Text & "') , ('" & txtName.Text & "') ")
*
I have error.
what can i do now ?

Copyright © 2005-08 www.BigResource.com, All rights reserved