473,793 Members | 2,974 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Forms: Output Data to Input Data Between Forms ?

Hi all, I have a form that shows student information (primary key =
student ID). I have buttons on this form to bring up other forms that
can be used to register student for certain events. The first form is
data from a student table, while the ones for registering the student
are connected to a table s called Students Registered for an event
(primary key = Student ID + Event ID).

The problem is, then when you open the registration form, you have to
manually put in the Student ID as input. I would like to pull whatever
Student ID was currently showing in the Student form to be
automatically put into the registration form.

Any help is much appreciated. Thanks,

--Eric

Oct 24 '07 #1
3 1812
On Oct 24, 1:11 pm, "PowerLifter1.. .@gmail.com"
<PowerLifter1.. .@gmail.comwrot e:
Hi all, I have a form that shows student information (primary key =
student ID). I have buttons on this form to bring up other forms that
can be used to register student for certain events. The first form is
data from a student table, while the ones for registering the student
are connected to a table s called Students Registered for an event
(primary key = Student ID + Event ID).

The problem is, then when you open the registration form, you have to
manually put in the Student ID as input. I would like to pull whatever
Student ID was currently showing in the Student form to be
automatically put into the registration form.

Any help is much appreciated. Thanks,

--Eric
Hey Eric,
If you don't want to use code to do this, here is the easiest way.
Let's say that the main form (the one with studenID) is named fMain
and the registration form is named fRegistration.
Let's also say that the controls on both and fRegistration and fMain
for studentID are called txtStudentID.
Design fRegistration and set the default value of txtStudentID = forms!
fMain!txtStuden tID. Then set the visible property to false.
This will only work if fMain is open. It's also a good idea to make
sure the record in fMain has been saved (in case it was a new
record).

As a side note, often opening and closing multiple windows can get a
bit confusing. I would experiment with the tab control. You can add
all you forms and switch between them much more easily.
Good luck
P

Oct 24 '07 #2
On Oct 24, 5:06 pm, Pachydermitis <praesa...@gmai l.comwrote:
On Oct 24, 1:11 pm, "PowerLifter1.. .@gmail.com"

<PowerLifter1.. .@gmail.comwrot e:
Hi all, I have a form that shows student information (primary key =
student ID). I have buttons on this form to bring up other forms that
can be used to register student for certain events. The first form is
data from a student table, while the ones for registering the student
are connected to a table s called Students Registered for an event
(primary key = Student ID + Event ID).
The problem is, then when you open the registration form, you have to
manually put in the Student ID as input. I would like to pull whatever
Student ID was currently showing in the Student form to be
automatically put into the registration form.
Any help is much appreciated. Thanks,
--Eric

Hey Eric,
If you don't want to use code to do this, here is the easiest way.
Let's say that the main form (the one with studenID) is named fMain
and the registration form is named fRegistration.
Let's also say that the controls on both and fRegistration and fMain
for studentID are called txtStudentID.
Design fRegistration and set the default value of txtStudentID = forms!
fMain!txtStuden tID. Then set the visible property to false.
This will only work if fMain is open. It's also a good idea to make
sure the record in fMain has been saved (in case it was a new
record).

As a side note, often opening and closing multiple windows can get a
bit confusing. I would experiment with the tab control. You can add
all you forms and switch between them much more easily.
Good luck
P- Hide quoted text -

- Show quoted text -
Beautiful; I didn't think it would be anything that simple for some
reason; I was sure some coding would be involved. Thanks very much for
your help!

--Eric

Oct 24 '07 #3
On Oct 24, 3:12 pm, "PowerLifter1.. .@gmail.com"
<PowerLifter1.. .@gmail.comwrot e:
On Oct 24, 5:06 pm, Pachydermitis <praesa...@gmai l.comwrote:


On Oct 24, 1:11 pm, "PowerLifter1.. .@gmail.com"
<PowerLifter1.. .@gmail.comwrot e:
Hi all, I have a form that shows student information (primary key =
student ID). I have buttons on this form to bring up other forms that
can be used to register student for certain events. The first form is
data from a student table, while the ones for registering the student
are connected to a table s called Students Registered for an event
(primary key = Student ID + Event ID).
The problem is, then when you open the registration form, you have to
manually put in the Student ID as input. I would like to pull whatever
Student ID was currently showing in the Student form to be
automatically put into the registration form.
Any help is much appreciated. Thanks,
--Eric
Hey Eric,
If you don't want to use code to do this, here is the easiest way.
Let's say that the main form (the one with studenID) is named fMain
and the registration form is named fRegistration.
Let's also say that the controls on both and fRegistration and fMain
for studentID are called txtStudentID.
Design fRegistration and set the default value of txtStudentID = forms!
fMain!txtStuden tID. Then set the visible property to false.
This will only work if fMain is open. It's also a good idea to make
sure the record in fMain has been saved (in case it was a new
record).
As a side note, often opening and closing multiple windows can get a
bit confusing. I would experiment with the tab control. You can add
all you forms and switch between them much more easily.
Good luck
P- Hide quoted text -
- Show quoted text -

Beautiful; I didn't think it would be anything that simple for some
reason; I was sure some coding would be involved. Thanks very much for
your help!

--Eric- Hide quoted text -

- Show quoted text -
You are welcome.
You can use the same syntax to limit the data displayed in a report.
Just put the forms!fMain!txt StudentID in the criteria of the dataset
query.
P

Oct 24 '07 #4

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

Similar topics

2
2548
by: Richard | last post by:
**** Post for FREE via your newsreader at post.usenet.com **** HI, I am working on a project where I need to input data to a (local) HTML page using multiple form elements, such as text, radio, checkbox, and dropdown. When the form Submit button is clicked, I then need the input data either written to another location on the same page, or written to another page (a different frame would be fine)
6
2871
by: ALthePal | last post by:
Hi, I'm not sure if we are able to or even how to loop through the web forms in a VB.NET project during design time. In MSAccess we are able to go through the database -> forms collection and loop through all the forms in a database and pull information about the form (controls and properties). We would need to do the same in our VB.NET project; loop through the project and get the web form's control and property information...
11
9122
by: Michael Tallhamer | last post by:
I am a medical physicist new to the .Net Framework and am trying to write a simple app that will monitor the output from a serial port on one of my linear accelerators using the new Serialport object and write the output to a textBox in my application for viewing. I however keep getting this error and am unable to figure out how to get around this. System.InvalidOperationException was unhandled Message="Cross-thread operation not valid:...
3
1676
by: Syl | last post by:
I have a simple test html form at http://www.radiosport.ca/test/test.html It use the POST method to send a name to a php script that prints the input data in the $_POST array and from the raw input data <?php $data = $_POST; print "\$_POST: $data"; $data = file_get_contents("php://input"); print "Raw Input: $data"; ?> And I have a test pdf form that uses a HTTP Submit button - it also calls the php script...
3
11847
by: elyob | last post by:
Okay, I'm about to add some checkboxes to a form, and then store the data in a column on a MySQL database. Just wanted to know best practice, at the moment I'm writing and thinking .. God that's ungly code ... <input type="checkbox" name="delta" <?php if ($delta==1) { echo "checked"; }?>> Delta<br> <input type="checkbox" name="mastercard" <?php if ($mastercard==1) { echo "checked"; }?>> Mastercard<br> <input type="checkbox" name="solo"...
10
10054
by: morangolds | last post by:
Hi, I've been having a problem with C++ Windows Forms apps not "ending" when you close the form window. I've searched about this problem all over the place and most searches have lead me to believe that this has to do with unreleased form component events or event handlers. I'm comparatively new to .net and windows forms, in the sense that though I've been using them for over 2 years now, it's been rather sporadic. I work with...
5
14132
by: c676228 | last post by:
Hi everyone, my colleagues are thinking about have three insurance plans on one asp page: I simplify the plan as follow: text box:number of people plan1 plan2 plan3
19
248273
Atli
by: Atli | last post by:
Introduction At some point, all web developers will need to collect data from their users. In a dynamic web page, everything revolves around the users input, so knowing how to ask for and collect this data is essential to any developer. This article is a basic tutorial on how to user HTML Forms, the most common method of data collection. Assumptions - Basic HTML knowledge. - Basic PHP knowledge. HTML Forms A common and simple way of...
0
2042
by: gervo | last post by:
I have built a series of email forms in flash MX. using perl. the forms work for some people but not all and I was hoping some one could help me out. Here is the Actionscript on the send button on (release, keyPress "<Enter>") { if (company ne "" and first ne "" and last ne "" and phone ne "" and fax ne "" and mobile ne "" and email ne "" and address ne "" and city ne "" and state ne "" and zip ne "") { i = "0"; validmail = 0;...
0
9518
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10430
Oralloy
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10211
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10000
tracyyun
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6776
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5436
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5560
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3719
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2917
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.