Default Value from field in differnet table

S

Simon

Hi

I have three tables. The first table has a field called
INDEX. The 2nd table has a field called FUND and a field
called REFERENCE INDEX where I have a look up function to
the first table on the field INDEX. The 3rd table has
three fields: CUSTOMER NUMBER, FUND and INDEX.

I would like to be able to select a FUND on the 3rd table
(look up function to the 2nd table) as soon as I have do
that I would like to see the "default value" in the field
INDEX. The deafault value should be taken from the 2nd
table.

Is there a way to set a table and field link into the
Default Value field in the table field definition?

If you need any further information please let me know.

Regards

Simon
 
T

Tim Ferguson

I have three tables. The first table has a field called
INDEX. The 2nd table has a field called FUND and a field
called REFERENCE INDEX where I have a look up function to
the first table on the field INDEX. The 3rd table has
three fields: CUSTOMER NUMBER, FUND and INDEX.

It's an odd situation:

ONE TWO THREE
=== === =====
Index >---+ Fund >-----+ CustNum
+----- RefIndex +-- Fund
Index
I would like to be able to select a FUND on the 3rd table
(look up function to the 2nd table) as soon as I have do
that I would like to see the "default value" in the field
INDEX. The deafault value should be taken from the 2nd
table.

What about the normal DLookup function? You can read it in the txtFund
control AfterUpdate event...

DLookUp("RefIndex", "Two", "Fund=""" & me.txtFund & """")
Is there a way to set a table and field link into the
Default Value field in the table field definition?

Well... no! The DefaultValue is looked up at the moment the record is first
created. There is no Fund value to look up just then, because no-one has
had the time to enter it.

Hope that helps


Tim F
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top