Form works as stand alone but not as a subform

AC5FF

Registered User.
Local time
Today, 08:09
Joined
Apr 6, 2004
Messages
552
Hopefully this is an easy one for someone. I am not having luck searching and fixing it myself.

I've created a form based off of a table that works great. One field is a lookup field to make sure only valid accounting code entries are made. There is another field that is temporary to display to the users a descriptive text of the lookup accounting code.

Here is the line for that field:
=DLookUp("Title","ACCOUNTS","[Acct Number] = '" & [Forms]![EntryTable_Hours Input]![Acct Number] & "'")

This works just as I need it to when I view the form directly. However; it's final use will be as a sub-form. At this point the DLookUp line does not work.

Any one out there seen this before and have an easy fix?

Thanks!
 
[Forms]![EntryTable_Hours Input]![Acct Number]
is wrong, if that control is on the subform, in which case it requires the subform reference.
 
Try:
=DLookUp("Title","ACCOUNTS","[Acct Number] = '" & Me.[Acct Number] & "'")
 
Thought that might be it - but i am getting an error on that.

"The object doesn't contain the Automation object 'me.'
 
Why not include table "ACCOUNTS" in the query that the form is based on. Then you could include the "Title" field as a bound control.
 
Bob... Just got home from work, won't be able to mess with this until Monday.

However, the form is based off a table directly and not a query...
 

Users who are viewing this thread

Back
Top Bottom