?
Solved

Dynamically calculated field in Form - newbie question

Posted on 2002-03-14
4
Medium Priority
?
158 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 58

Accepted Solution

by:
Jim Dettman (Microsoft MVP/ EE MVE) earned 400 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

719 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