i am doing test program to understand how to fill a listview with information i enter in another form and also using VB6 but so far unsucessfull. in one form i am using an ADODC control to put information in an access database i have created the fields consist of ClientID, FirstName, LastName,Address, City, State. etc. on another form i have a Listview control. i want to know how i can get the information that i have entered in the first form onto the second form when i open it. so far i can only retrieve the fields of the first entry and not all the information in the database here is my code for the second form *Listview" - Private Sub Form_Load()
-
Dim LHeader As ColumnHeader
-
Dim LItem As ListItem
-
lwidth = ListView1.Width - 5 * Screen.TwipsPerPixelX
-
ListView1.ColumnHeaders.Add(1, , "ClientsID", lwidth / 7) = "Clients ID"
-
ListView1.ColumnHeaders.Add(2, , "FirstName", lwidth / 4) = "First Name"
-
ListView1.ColumnHeaders.Add(3, , "Lastname", lwidth / 4) = "Last Name"
-
ListView1.ColumnHeaders.Add(4, , "Phone", lwidth / 5) = "Phone"
-
ListView1.ColumnHeaders.Add(5, , "Cell", lwidth / 5) = "Cell"
-
ListView1.View = lvwReport
-
Set LItem = ListView1.ListItems.Add(1, , NewClients.ClientsID.Text)
-
LItem.SubItems(1) = NewClients.FirstName
-
LItem.SubItems(2) = NewClients.LastName
-
LItem.SubItems(3) = NewClients.PhoneNumber
-
LItem.SubItems(4) = NewClients.CellNumber
-
End Sub
how can i get the rest of the information instead of just one. for example i enter in all the fields then save then enter in another set a fields and save it so now i have two separate information but when i open up the second form there is only the first line of information and not the second one how do i get then all to show. please help me with this code i show you
lee123
4 1483
Hi Lee123,
I think you are trying to load from first form to the second form. Your problem will be solved if you load ListItems from Database since you have saved your information in database.
Thanks
Hi Lee123,
Here is my attached help.
Good Luck
kinwang2009,
thank you for the help. and it works is there anyway you could explain this code to me. because i am not good with recordsets just from the (ADODC1) control way i would like to know a little more about this connection so i can continue to use it and understand it.
lee123
Hi Lee123,
It will be my pleasure to explain you all but i find it is bit time consuming. In this regard I advise you to go through Connection string tutorials. If you dont understand that tutorials then I will explain through email or chat.
I feel this connection string in simple and most efficient way to connect to your databases.
Thankx
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Joaquin Grech |
last post by:
Hi
I did alot of research on this on the web and msdn and I couldn't find
anything.
I have a listview showing as a grid (table looking, with rows and columns
and no images at all, only text)....
|
by: Paddy |
last post by:
private void listView1_SelectedIndexChanged(object sender, System.EventArgs
e)
{
textBox1.Text = this.listView1.Items.SubItems.Text;
}
This will display sub item after cklicking on item
I...
|
by: gsb58 |
last post by:
Hi!
I haven't worked with streams before.
On a form I have:
A. cboValues = A combobox with text values where the user can choose
a value
B. txtText = A textbox where the user can enter...
|
by: Lucky |
last post by:
hi guys,
i'm looking for a soultion that helps me to show the subitem text
of the listview control in the tooltip when the mouse pointer hovers on
the subitem. i've found on solution, according to...
|
by: Steve |
last post by:
OK, I am stumped. I cannot for the life of me get images to show in
ListView items while the view is set to Details. I create an
ImageList, set the SmallImageList to point to the ImageList, then...
|
by: mfc |
last post by:
How do i get the type info in a static method?
for instance in the code below is it possible for the Method to get the type
to know what type was used to call Method?
thanks
class C {
|
by: deerchao |
last post by:
I set ListView.Dock to Top, but how can I get the desired height to
avoid it to show vertical scrollbar?
I mean is there something like ListView.ClientSize or
ListView.VirtualHeight?
Thanks!
|
by: Armin Zingler |
last post by:
"Bill Schanks" <wschanks@gmail.comschrieb
Try to execute
lvMembers.beginupdate
before filling and
lvMembers.endupdate
|
by: Jackmac |
last post by:
Hi there,
Hopefully an easy one for someone. I'm writing a small app (Visual Studio
2008) which will take an existing access database we have and show it in a
form I'm writing. The fields have...
|
by: mesut |
last post by:
Hi colleagues,
I've a very strange problem here. I have no clue whyt it happens.
I have a listview. The Listview populates well. I have an Update
Button in the listview and a...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
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,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
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,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
| |