Passing a date from a "pop up" form

  • Thread starter Thread starter Chris
  • Start date Start date
C

Chris

Hi all

I would appreciate some help with this one please.

On my form I have an unbound pop up form which opens when
the user clicks a command button. This form enables a
user to calculate a course finish date which he/she then
types into the appropriate field. What I would really like
is for my pop up form to "pass" this date directly into
the required field (course end date).

I guess I need some "event procedure" code, but where do I
put the code and what should it read?

Any help/suggestions please.

Many thanks

Chris
 
You'll probably want to put a button on the pop up. Then you can set the
value and close the form. Assuming the finish date is in a field called
"FinishDate" on both forms, and the main form is called "Main", you'd use:

Forms!Main!FinishDate = Me!FinishDate

HTH

--
Rebecca Riordan, MVP

Designing Relational Database Systems
Microsoft SQL Server 2000 Programming Step by Step
Microsoft ADO.NET Step by Step

http://www.microsoft.com/mspress

Blessed are they who can laugh at themselves,
for they shall never cease to be amused...
 
Rebecca

Thanks for your help.I already have a close button on my
pop up form. Where do I put the code you have given me? Is
it attached to the close button "on click" property, so
that clicking the close button performs 2 tasks, closing
the pop up and passing the date to my other form?

Thanks

Chris
 
Yep, that's exactly where you'd put it. Just make sure you put it _before_
the Close statement.

--
Rebecca Riordan, MVP

Designing Relational Database Systems
Microsoft SQL Server 2000 Programming Step by Step
Microsoft ADO.NET Step by Step

http://www.microsoft.com/mspress

Blessed are they who can laugh at themselves,
for they shall never cease to be amused...
 
Back
Top