Re: How to populate a control from one of a number of forms that might be open
- From: "Barr" <barr@xxxxxxxxx>
- Date: Sun, 11 Jun 2006 11:15:29 -0700
100% correct! Very interesting and much appreciated.
"tina" <nospam@xxxxxxxxxxx> wrote in message
news:YnXig.167730$Fs1.94263@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
well, it's not clear whether you're opening form B from an already-open
A-series form, or vice versa. i'll assume that an A-series form is open,
and
you're opening form B from it. one solution is to use the OpenArgs
argument
of the OpenForm code in the A-series forms, as
DoCmd.OpenForm "FormB", , , , , , Me!SomeControlName
then refer to the OpenArgs property of form B, in its' Load event, to set
the value of the control, as
Me!SomeControlName = Me.OpenArgs
note that the value of the OpenArgs property is a string. if you get a
"type
mismatch" error, you'll probably have to coerce the value to the
appropriate
data type with a conversion function such as CDate(), CLong, etc.
hth
"Barr" <barr@xxxxxxxxx> wrote in message
news:e6go76$fd4$1@xxxxxxxxxxxxxxxxxxxxxxxxxxx
I would like to populate a control in form B with a value from a controlusing
with a common name in say 5 different forms (A1-A5), the one form I am
(A1-A5), should determine what to populate the new one (form B) with whenI
open form (command button). How do I refer to the control on the firstform
(say A4 for example) on the second form (form B) which has a differentname
cause it comes from one of five different forms?
.
- References:
- Prev by Date: Re: Populating a list -- table structure?
- Next by Date: Re: Dlookup Question
- Previous by thread: Re: How to populate a control from one of a number of forms that might be open
- Next by thread: Search by derived field.
- Index(es):