J
jo
Marsh,
I changed my default value to Parent.CompanyName, etc. It
copies the info to the subform. I tried the me.recalc on
my subform enter event but it still doesn't record the
data in the subform table. If I click in the first field
of the subform (ShipLocName and begin re-typing the data
(I'm trying to not have to retype data), only then does
the autonumber get assigned to the record.
Is there something else I need to include with my
me.recalc?
-----------------------------------
It seems that the default value property is determined
before you get to the subform and it's not reset in sync
with what's happening on the main form.
The thing that appears to work for me is to use the subform
Control's Enter event to execute:
Me.Recalc
BTW, it may be a little better to set the DefaultValue
property to:
Parent.CompanyName
instead of
Forms!Company!CompanyName
and, AFAICT, there is no need to use an = sign with this.
I changed my default value to Parent.CompanyName, etc. It
copies the info to the subform. I tried the me.recalc on
my subform enter event but it still doesn't record the
data in the subform table. If I click in the first field
of the subform (ShipLocName and begin re-typing the data
(I'm trying to not have to retype data), only then does
the autonumber get assigned to the record.
Is there something else I need to include with my
me.recalc?
-----------------------------------
jo said:I have a Company form which includes the CompanyName,
CompanyAddress, CompanyCity, CompanySt, CompanyCountry.
Within this form is a nested ShipLoc Form which contains
similar information as above: ShipLocName, ShipLocAddress,
etc. I'm using tables from our existing order entry
system which requires that every company entry must have a
corresponding shiplocation. I know it sounds redundant,
but it was created many years ago.
I'm trying to make it easier for the user so they don't
have to retype information when entering a prospect. Once
it is entered in the Company form, I want the exact same
information to show up in the ShipLoc Form (at times,
there may only be a street address change). I'm currently
using the "default value" property for each field on on my
ShipLoc form and inserting: =[Forms]![Company]!
[CompanyName] and changing the corresponding field name
respectively.
Unfortunately, due to my inexperience at VB, when entering
a new company or prospect, the data in the ShipLoc Form is
not being inserted in the ShipLoc Table.
It seems that the default value property is determined
before you get to the subform and it's not reset in sync
with what's happening on the main form.
The thing that appears to work for me is to use the subform
Control's Enter event to execute:
Me.Recalc
BTW, it may be a little better to set the DefaultValue
property to:
Parent.CompanyName
instead of
Forms!Company!CompanyName
and, AFAICT, there is no need to use an = sign with this.