Help! Access Subform Question

  • Thread starter Thread starter Kristen
  • Start date Start date
K

Kristen

Help! I posted my question, but I haven't received a
response yet. My question is posted as "Automatically
Updating a Field in a Subform." Does anyone have any
suggestions? Or do you need more information from me?
Question is below.
____________________________________

I have a form F_BidTracker and a subform on that form
called FS_BidGCs which is in datasheet view.

There are fields on the subform called GCContact, and
GCPhone. I want GCPhone to automatically fill in when I
pick the GCContact from a list.

Two ways I have tried, but don't exactly work are:

1) setting the control source of GCPhone to "=Forms!
F_BidTracker!FS_BidGCs.Form!GCContact.Column(2)"

2) Making a macro that sets GCPhone to "Forms!F_BidTracker!
FS_BidGCs.Form!GCContact.Column(2)" on the AfterUpdate
Event of GCContact.

Okay, both of these options work and pull up the phone
number, HOWEVER, it if you are on the first record, it
sets this phone number for the current record in the
datasheet and the one below it (which hasn't even been
created yet). If I go to the next record and select a new
GCContact, it resets the record above's phone, the current
record's phone, and the record below's phone.

Do you know of a way where it will just set the phone for
the current record?

If you could tell me how to do it with macros or property
settings that would be great, becasue I don't understand
VB.

Thank you in advance.
..
 
That's is the normal behaviour or Unbound / Calculated Control. The many
instances of this Control will show the same value calculated from the
values of the *CurrentRecord* (on the Subform).

The only way to show different values in the many instances of the Control
in the Subform is to bind it to a Field in the SubForm's RecordSource.
Thus, in your case, you will have to include the PhoneNo Field in the
Subform's RecordSource.

I am not sure which Access version you are using but in one instance in A2K2
I experienced, the many instances of a Calculated Control actually show
different and correct values. However, the major problem is that I couldn't
exit from Access cleanly. Even thought nothing appears on screen,
MSAccess.exe is still in the memory and wouldn't release about 24 MB of
memory until reboot.
 
Back
Top