Allen Browne

S

siggy

yesterday you suggested
=DLookUp("COMMODITY","RATES","Rate_Check = " & Rate_Code)
or add the extra quotes if Rate_Code is a Text type field:
=DLookUp("COMMODITY","RATES","Rate_Check = """ & Rate_Code & """")

sorry..... I originally thought if was working -- BUT

it appears that the DLookUP you suggested returns the
same result for all values of: 'Rate_Check' -- not
the result where Rate_Check = Rate_Code.................


siggy



Allen Browne said:
The square brackets should be around the table name and field name
individually if you use them. You can probably drop the table name. And it
would help to concatenate the value into the expression.

Try:
=DLookUp("COMMODITY","RATES","Rate_Check = " & Rate_Code)
or add the extra quotes if Rate_Code is a Text type field:
=DLookUp("COMMODITY","RATES","Rate_Check = """ & Rate_Code & """")
I use:
=DLookUp("COMMODITY","RATES","Rate_Check = [RATES.Rate_Code]")
in a form field the display textual data based on what is entered in a
form field.


the Problem is that this look-up data is NOT displayed right away
( as soon as the first field is entered ) ... it is only displayed after
the record
is saved...

I would like the field to be populated with the LOOK-UP data as soon
as the first field text is entered and the user TABS out of that field...
 
A

Allen Browne

Hi siggy. I did post a follow up to that thread.
Sometimes these things don't show up, so here it is again:

<quote>
Is there a control named Rate_Code in your form?

If so, it should concatenate the values into the 3rd argument, and return
the matching value.

For more help, see:
Getting a value from a table: DLookup()
at:
http://allenbrowne.com/casu-07.html
</quote>

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

siggy said:
yesterday you suggested
=DLookUp("COMMODITY","RATES","Rate_Check = " & Rate_Code)
or add the extra quotes if Rate_Code is a Text type field:
=DLookUp("COMMODITY","RATES","Rate_Check = """ & Rate_Code & """")

sorry..... I originally thought if was working -- BUT

it appears that the DLookUP you suggested returns the
same result for all values of: 'Rate_Check' -- not
the result where Rate_Check = Rate_Code.................

Allen Browne said:
The square brackets should be around the table name and field name
individually if you use them. You can probably drop the table name. And
it
would help to concatenate the value into the expression.

Try:
=DLookUp("COMMODITY","RATES","Rate_Check = " & Rate_Code)
or add the extra quotes if Rate_Code is a Text type field:
=DLookUp("COMMODITY","RATES","Rate_Check = """ & Rate_Code & """")
I use:
=DLookUp("COMMODITY","RATES","Rate_Check = [RATES.Rate_Code]")
in a form field the display textual data based on what is entered in a
form field.


the Problem is that this look-up data is NOT displayed right away
( as soon as the first field is entered ) ... it is only displayed
after
the record
is saved...

I would like the field to be populated with the LOOK-UP data as soon
as the first field text is entered and the user TABS out of that
field...
 

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