G
Guest
I worked on a project at home, using Access 2003. I used the following
function in a textbox on one of my forms:
=DLookUp("[Next]",Enforcement Table Query","[CodeID]=[Enforcement Table
Query]!Code")
This looked up prior enforcement numbers, and then gave the user an option
to assign the "Next" one as a new one.
I then brought my query back to the office, which is in the dark ages of
Access 1997. I didn't think there would be any effect for something this
simple. But I did change the name of some of my queries and fields. The
text box that I amended has the following code:
=DLookUp("[Next]","Enforcement Log Counting Query","
function in a textbox on one of my forms:
=DLookUp("[Next]",Enforcement Table Query","[CodeID]=[Enforcement Table
Query]!Code")
This looked up prior enforcement numbers, and then gave the user an option
to assign the "Next" one as a new one.
I then brought my query back to the office, which is in the dark ages of
Access 1997. I didn't think there would be any effect for something this
simple. But I did change the name of some of my queries and fields. The
text box that I amended has the following code:
=DLookUp("[Next]","Enforcement Log Counting Query","
Code:
= [Enforcement
Log Counting Query]!Code")
This one now has the same number, which happens to be the number of the
first record in the query, and never changes. So I tried typing one by
scratch, several different ways:
=DLookUp("[Next]","Enforcement Log Counting
Query","forms![Me]!Code=[Enforcement Log Counting Query]!Code")
or
=DLookUp("[Next]","Enforcement Log Counting Query","[Code]=[Enforcement Log
Counting Query]!Code")
or
=DLookUp("[Next]","Enforcement Log Counting Query","Code=[Enforcement Log
Counting Query]!Code")
or
=DLookUp("[Next]","Enforcement Log Counting Query","[Code]=[Enforcement Log
Counting Query]![Code]")
I have played with brackets and quotation marks, and always either get a
blank field or a "#Error" message.
Any suggestions would be greatly appreciated.