Forms: Output Data to Input Data Between Forms ?

Forms: Output Data to Input Data Between Forms ?

am 24.10.2007 22:11:34 von PowerLifter1450

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

Re: Forms: Output Data to Input Data Between Forms ?

am 24.10.2007 23:06:43 von Pachydermitis

On Oct 24, 1:11 pm, "PowerLifter1...@gmail.com"
wrote:
> 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!txtStudentID. 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

Re: Forms: Output Data to Input Data Between Forms ?

am 25.10.2007 00:12:58 von PowerLifter1450

On Oct 24, 5:06 pm, Pachydermitis wrote:
> On Oct 24, 1:11 pm, "PowerLifter1...@gmail.com"
>
>
>
>
>
> wrote:
> > 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!txtStudentID. 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

Re: Forms: Output Data to Input Data Between Forms ?

am 25.10.2007 00:42:50 von Pachydermitis

On Oct 24, 3:12 pm, "PowerLifter1...@gmail.com"
wrote:
> On Oct 24, 5:06 pm, Pachydermitis wrote:
>
>
>
>
>
> > On Oct 24, 1:11 pm, "PowerLifter1...@gmail.com"
>
> > wrote:
> > > 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!txtStudentID. 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!txtStudentID in the criteria of the dataset
query.
P