Re: Passing values between forms
Tech-Archive recommends: Fix windows errors by optimizing your registry
How can I pass a value from one form to another. For instance, I have a form
that selects a UserID when a task is performed and I'd like to open another
form, passing the UserID in, so I can do a table lookup in the second form.
Just add that parameter into existing form constructor.
E.g.
MyForm(int userID) {
InitializeComponents //leave this as is.
//save this userID as private variable or just do what ever you need
here
}
After that you can use it as:
using (MyForm f = new MyForm(42) ) {
f.ShowDialog(this)
}
--
Greetings,
Josip Medved
http://www.jmedved.com
.
Relevant Pages
- Re: Can someone check this code for me?
... Type: Lookup ... Am I missing something??? ... UserInformation - Already on Site ... > field UserID from a Lookup of UserInformation, ... (microsoft.public.sharepoint.portalserver.development) - Re: Can someone check this code for me? -- Got it
... In case anyone cared - I found the solution finally...all 'Lookup' fields ... So if the record in the referenced list for username is 2, ... > Wondering if someone could check my code right quick - the failure is on ... It is a field called UserID with a Type of Lookup...do I need to ... (microsoft.public.sharepoint.portalserver.development) - Lookup based on 2 criteria
... I need to perform a lookup based on information shown in 2 adjacent columns ... A = Date, Col. B = UserID). ... LSM ... Prev by Date: ... (microsoft.public.excel.worksheet.functions) - Can someone check this code for me?
... lookup in another List. ... Dim listService As New updatelist.Lists ... It is a field called UserID with a Type of Lookup...do I need to ... (microsoft.public.sharepoint.portalserver.development) - Re: Design considerations for table to store Emails in?
... you should be able to launch a trigger when the email address field is ... updated to lookup the userid from your user table and update it if present. ... present (provided that your user table isn't something used to gain access ... (microsoft.public.sqlserver.programming) |
|