Re: Passing form name to another form...
- From: EyeTech <EyeTech@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 4 Aug 2006 07:01:02 -0700
Tina's suggestion is a good one...while the first suggestion:
Forms(Me.OpenArgs)![Tracks Entry 1]![Song No] = Me![Song Id]
gave a type missmatch error (OpenArgs is type Variant)
using a string variable in this suggestion
Forms(StringVariableName)![Tracks Entry 1]![Song No] = Me![Song Id]
does the trick...
I was on the right track...I missed the parens! Duh.
Thanks Tina and Allen as well for your proposed fix...a little more work,
but interesting.
"tina" wrote:
try.
Forms(Me.OpenArgs)![Tracks Entry 1]![Song No] = Me![Song Id]
or
Forms(StringVariableName)![Tracks Entry 1]![Song No] = Me![Song Id]
replacing StringVariableName with the name of a valid string variable, of
course.
hth
"EyeTech" <EyeTech@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:BE5C1620-E234-41D6-97F9-214EC625F8E4@xxxxxxxxxxxxxxxx
I have a need to pass a form name from one form to another in which thebeen
original forms name will be used by the second form to populate a field on
the original after a search is done. I have been successful in passing the
form name in the OpenArgs parameter for the called form, but I have not
able to use the arg or any other variable I might place the name in topassed
reference the original form.
If I pass "Form_A" in OpenArgs, I can confirm that it is succesfully
to Form_B, however, if I try to reference the original form as, forinstance
OpenArgs...
Forms![Album Main 2]![Tracks Entry 1]![Song No] = Me![Song Id]
is my original. However, if I attempt to use a variable, such as
into
Forms!OpenArgs![Tracks Entry 1]![Song No] = Me![Song Id]
it will fail. I have also passed the OpenArgs into a string variable and
used it, but it fails also.
My need is this. I am building a very large and complex database of music
which requires that the operator search for and place the correct song
an album or cd tracks table. Since there are two criteria which make asong
unique TITLE and COMPOSERS, this operator intervention is necessary toensure
that the correct piece is attached to each compilation. The problem isthat I
have to use Form_B with various versions of Form_A, hence the need to beable
to simply pass the calling form name and use it for the back reference.make
(Form_B closes when the correct entry is chosen by the operator.) It would
seem to make more sense to use the method I have described rather than
several copies of Form_B, each hard-coded for each calling Form_A version.
Any thoughts, tips, castigations? All appreciatied.
Thanks,
Don
- References:
- Re: Passing form name to another form...
- From: tina
- Re: Passing form name to another form...
- Prev by Date: Re: How to disable hypelink warning message?
- Next by Date: Re: Removing Record Functions At The Bottom Of A Form
- Previous by thread: Re: Passing form name to another form...
- Next by thread: Default value based on data in the same record
- Index(es):