473,385 Members | 1,661 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,385 software developers and data experts.

Passing information from one form to another

PM
I have a VB.NET question about ListViews and Forms.

I have a listview with records. I want a user to be able to double-click on
a record, and have a subform come up with detailed information about that
particular record. This user can then make edits.

The problem is - I do not know how to pass information from a form to
another form. I don't want to use Public variables if possible.

Basically, How do I pass the value of the selected record in the first form
to the second form. I can then use this value in the second form to open the
appropriate record.

thanks!
P
Nov 21 '05 #1
2 1694
Form constructor New(SelectedItem as MyListItem) maybe?

Make your list items be from a class that inherits the class used to
populate listview items(don't recall the name).

HTH,

Shane

ps.. If not you would need Friend Property Set/Get procedures or variables,
or a SUB

"PM" <PM@discussions.microsoft.com> wrote in message
news:54**********************************@microsof t.com...
I have a VB.NET question about ListViews and Forms.

I have a listview with records. I want a user to be able to double-click
on
a record, and have a subform come up with detailed information about that
particular record. This user can then make edits.

The problem is - I do not know how to pass information from a form to
another form. I don't want to use Public variables if possible.

Basically, How do I pass the value of the selected record in the first
form
to the second form. I can then use this value in the second form to open
the
appropriate record.

thanks!
P

Nov 21 '05 #2
"=?Utf-8?B?UE0=?=" <PM@discussions.microsoft.com> wrote in
news:54**********************************@microsof t.com:
Basically, How do I pass the value of the selected record in the first
form to the second form. I can then use this value in the second form
to open the appropriate record.


http://www.codeproject.com/dotnet/Wo...thWinForms.asp
--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
"Programming is an art form that fights back"

Empower ASP.NET with IntraWeb
http://www.atozed.com/IntraWeb/
Nov 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Dave Smithz | last post by:
Hi there, I have a situation where I want to have multiple submit buttons on the same form and therefore want to use a redirection php script that checks the value associated with the submit...
3
by: Simon Harvey | last post by:
Hi, In my application I get lots of different sorts of information from databases. As such, a lot of information is stored in DataSets and DataTable objects. Up until now, I have been passing...
4
by: thawk | last post by:
I have tried to pass information from one form to another using the described method in the documentation, but everytime I attempt to do this I get an error message that states that I have a null...
6
by: Max | last post by:
Last time I tried to explain this on another forum it didn't go too well, so I'll try my best and if you know what I'm talking about then please tell me how to do this. I have a class, inside I...
7
by: Drum2001 | last post by:
I am creating a database to track employee time. I have created a form that allows them to select from a combo box their task, enter their hours, and add any comments they may have. In the...
2
by: whitc26 | last post by:
Let me preface: I'm a novice, and have no programming experience. I have created an access database and have a few tables in it. I have created a form called "clients" This form opens up and...
7
by: AMP | last post by:
Hello, I have this in form1: namespace Pass { public partial class Form1 : Form { public Form2 form2; public Form1() {
7
by: The Doctor | last post by:
A rather elementary question, In VB5, how can I pass a variable from one form to another?
1
by: rfr | last post by:
I have a need to use a single version of a Visitor Response Feedback Form on numerous HTML documents. Rather than have numerous versions of this, one on each HTML document, it makes more sense to...
4
by: John Sheppard | last post by:
Hello there I was wondering if anyone could help me, I am trying to pass a typed dataset to a dialoged child form by reference. I have binding sources sitting on the child form. So to refresh...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
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
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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 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.