Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Dynamically calculated field in Form - newbie question

Posted on 2002-03-14
4
Medium Priority
?
161 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 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Microsoft Access has a limit of 255 columns in a single table; SQL Server allows tables with over 255 columns, but reading that data is not necessarily simple.  The final solution for this task involved creating a custom text parser and then reading…
Explore the ways to Unlock VBA Project Password Excel 2010 & 2013 documents. Go through the article and perform the steps carefully to remove VBA Excel .xls file.
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

877 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