getting a rate value from another table

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a form that is linked to a table, I also have a rate table. My problem
is that I would like to pull a rate from the rate table into this form. I
cannot make a query because the rate table holds no records just rates. Once
I have the rate in the form I want to use it only for a calculation.
Can someone please help me with some code that I can use in an unbound field
to pull this info in?

Thank You in Advance
 
I have a form that is linked to a table, I also have a rate table. My problem
is that I would like to pull a rate from the rate table into this form. I
cannot make a query because the rate table holds no records just rates. Once
I have the rate in the form I want to use it only for a calculation.
Can someone please help me with some code that I can use in an unbound field
to pull this info in?

Thank You in Advance

=DLookUp("[RateField]","TableName")

But you will most probably need additional coding so that Access can
find the rate you are looking for, not just the first rate it comes to
in the table.
In general it will look something like this:

=DLookUp("[RateField]","TableName","[SomeField] = " & SomeCriteria)

Look up the DLookUp() function in VBA help as well as
Where Clause + Restrict data to a subset of records.
 
Back
Top