Discussion Locked

count Items in Text box or list box

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I have an Outlook form that the user needs to add information about a customers Equipment-"make,model,serial number contract start,contract end" I have the user enter the information in text boxes then click a button and the contents of the text boxes to the list. I need to beable to add to the list without overwriting what is already there. My code works for one entry, a second entry overwrites the first. What I am thinking is to count what is in the box do something like add to count+1 to add the item to the next empty row.
Dennis

5 replies

by thallone

The simple solution would be to have two boxes, one for data entry, one to show the data that has already been entered previously. The disadvantage is that the user will have to know which box is to enter additional data, and which is to view/edit old data. Ideally you should also make the secont control box not visible until there is data to display(AfterUpdate ()Controlname.Visible=True)

by dennisbv

I have this setup but if they have to come back and add or make more than one entry the new entry over writes the second entry. I need to find out how I can make the entry go into the first blank row and not over write any entrys

by lo

Hi - Been a while since I did VB List Boxes but ... Assuming the Outlook form (never done them)work same/similar. There is a count property for a list box. Tell how many entries it has. There is also a add method or just .count + 1, set the list box index and add. Is that even close?

by dennisbv

I tryed the list box count and and recieved the error that the function was not supported. The above answer is what I was trying and the error prompted me to post this request

This discussion is closed to new replies.