Solved

Dynamically calculated field in Form - newbie question

Posted on 2002-03-14
4
153 Views
Last Modified: 2012-08-13
I'm very new at databases and Access, so please be kind...
I have two tables, A and B (in a one to many relationship). I'm trying to create a form for entering data into table A, such that as fields in the record are filled in, an unbound text field will dynamically assemble and display information taken from table B.

If I just enter an expression into the text field's control source property, it doesn't seem to be able to work outside of table A.

Do I need to create a query to mediate between the form and table A and B?, and to create the text for the display field? And if so, will/can the text display field update dynamically as the data entry fields are filled in?

Do I need to learn VBA to do what I am looking for?

Any help would be very much appreciated!
0
Comment
Question by:PatDunlavey
  • 2
4 Comments
 
LVL 57

Accepted Solution

by:
Jim Dettman (Microsoft MVP/ EE MVE) earned 100 total points
ID: 6865860
Pat,

  You need to make a query that joins the two tables, then base your form on that query rather then table a.

  By doing that, you get "row fix-up" automatically.  In other words you'll see all the b table data update when ever you change the a record.

Jim.
0
 
LVL 54

Expert Comment

by:nico5038
ID: 6865973
Hi Pat,

Normally a one to many relationship is used by adding a subform on a mainform.
The mainform is based on the main table and the subform (based on the dependent table) is linked by it's "mainkey-part" to the mainform.
Just using the access wizard, that starts automatically when you place a subform from the toolbox at the left, will guide you through all steps.

Thus only related rows will be displayed in the subform.

Basing one form on a "JOIN" query has the danger of getting a "read-only" situation, not enabling changes to the fields.

What do you want to display in that text field and what do you want to display when you have multiple "B" rows to one "A" row?

Nic;o)
0
 
LVL 54

Expert Comment

by:nico5038
ID: 7055027
for PatDunlavey

No comment has been added for the last two months.
So it's time to clean up this TA.
I will leave a recommendation in Community Support that this question is:
 - Answered by: JDettman (100) nico5038 (100)
Please leave any comments here within the
next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER !

Nic;o)
0
 
LVL 6

Expert Comment

by:Mindphaser
ID: 7070319
Force accepted

** Mindphaser - Community Support Moderator **

Nico, there will be a separate question with points for your help.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now