Text Box won't get Table Field (1 Viewer)

ccflyer

Registered User.
Local time
Today, 00:59
Joined
Aug 12, 2005
Messages
90
I have a form based on a table called "WellData". I want to have a text box on this form that shows the first value in a field that is in a different table called "DateWellPrevious". The field is called "Oil".

I tried this as my textbox control source, but it didn't work:

Code:
=[Tables]![DateWellPrevious]![Oil]
Any Suggestions? :confused:
-Chris
 

ColinEssex

Old registered user
Local time
Today, 07:59
Joined
Feb 22, 2002
Messages
9,125
Firstly, your form should be based on a query not a table.

If your relationships are right, you can call the other field via a subform linked via the master/child PK ID fields.

Col
 

dopedealer

Systems Analyst
Local time
Today, 07:59
Joined
Apr 6, 2005
Messages
145
As Col as explained, however, if you don't want to use a sub form , make a query and use D Lookup for the "oil" field.
Chris
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 02:59
Joined
Feb 19, 2002
Messages
43,445
Joins, joins, joins, doesn't any one know how to create a query with a join? You are all working so hard to normalize your tables that you are forgetting how to turn the raw data back into information. Create a query that joins the main table to the lookup table. Use that query as the RecordSource for your form/report.

I only use DLookup() when a join would make my recordset not updatable. DLookups() are very inefficient and you need to be careful where you use them. Joins produce beter response.
 

Users who are viewing this thread

Top Bottom