On Feb 27, 12:30 pm, Jean-Francois Gauthier
<JeanFrancoisGauth...@discussions.microsoft.com> wrote:
> Hello,
>
[quoted text clipped - 14 lines]
>
> Sincerely,
I think the problem might be that when adding a new record, it doesn't
really exists until it is committed to the table. Opening a second
form and trying to add or relate information to a record that is not
there isn't possible. In one application I worked on we had the same
issue. We chose to place the notes in the main table, even though that
field may or may not be used. A hidden text box was placed on the main
form and a button opened a pop-up for the user to enter notes. This
pop-up referenced the textbox on the main form and the notes were
transfered between them. This way a new record could have all info
committed at the same time. We chose this route due to the number of
controls on the main form, it made sense for us to but a notes box
outside of it. If you have space on your main form, I would place it
there just to make things simpler. Perhaps a tab control to separate
the controls would work in your case.
Jean-Francois Gauthier - 27 Feb 2007 18:36 GMT
I like the popup idea with the hidden txt on teh main form, however other
then adding the hiddentxt field and making it hidden, and creating my form
and making it a popup, I have no idea how to relate the two together. Is
this something you can go a bit more into details with me?
Thanks for your help!
Jean-Francois Gauthier
> On Feb 27, 12:30 pm, Jean-Francois Gauthier
> <JeanFrancoisGauth...@discussions.microsoft.com> wrote:
[quoted text clipped - 31 lines]
> there just to make things simpler. Perhaps a tab control to separate
> the controls would work in your case.
storrboy - 27 Feb 2007 18:46 GMT
On Feb 27, 1:36 pm, Jean-Francois Gauthier
<JeanFrancoisGauth...@discussions.microsoft.com> wrote:
> I like the popup idea with the hidden txt on teh main form, however other
> then adding the hiddentxt field and making it hidden, and creating my form
[quoted text clipped - 40 lines]
> > there just to make things simpler. Perhaps a tab control to separate
> > the controls would work in your case.
If the two are always used together then it's simple. Replace control
and form names where appropriate
Adding other functionality like enabling/disabling/locking controls,
validation etc. would need to be added on top of this. Watch for line
wrapping...
In the pop-up form's Open or Load event:
Me!TextBoxForNotes = Forms("MainFormName").HiddenTextBox
In it's Close or Unload event
Forms("MainFormName").HiddenTextBox = Me!TextControlForNotes
>if there is an easier to do this.
Yes. Make the Notes form a Subform of the Docs form.
If you need space on the screen, you can use a Tab Control - put your
main form controls on one page and the subform on the second page.
John W. Vinson [MVP]
Jean-Francois Gauthier - 27 Feb 2007 19:55 GMT
I think we would rather have it as a popup form as it is an option to use,
but not mandatory, therefore if its not needed, we don't want the user to see
it unless he clicks a button and has the form pop up.
> >if there is an easier to do this.
>
[quoted text clipped - 4 lines]
>
> John W. Vinson [MVP]
John W. Vinson - 28 Feb 2007 07:12 GMT
>I think we would rather have it as a popup form as it is an option to use,
>but not mandatory, therefore if its not needed, we don't want the user to see
>it unless he clicks a button and has the form pop up.
How is that different than the user having an optional tab on a Tab
Control (which can even be made to appear on screen as a button, if
you wish; that's one of the options for a Tab)? If it's not needed,
they don't need to select the tab.
If you DO want a popup form you'll need two bits of code: one in the
OpenForm method to set the WhereCondition argument *and* to pass the
current DocID in the OpenArgs argument; and code in the notes form's
Open event to set the DefaultValue property of the DocID.
John W. Vinson [MVP]