- Local time
- Yesterday, 21:38
- Joined
- Feb 28, 2001
- Messages
- 27,131
The only things that could be wrong with that DLookup are listed below, and I have annotated the cases regarding probability of the problem being in the named facet of this call.
1. [Category] might not be the name of a field - unlikely, based on prior posts
2. [Company Name] might not be the name of a field - unlikely, based on prior posts
3. [Sales Tax Table] might not be the name of a table - unlikely, based on prior posts
4. Me.Name_Choose might not be the name of a control - not so clear, needs verification
5. The bound column for Me.Name_Choose isn't text - need to put a breakpoint so you can examine the value of Me.Name_Choose using the Debug.Print commend in the immediate window.
6. The control Me.Name_Choose is empty - can be verified same way as #5
7. You didn't give DLookup a destination. You didn't show us the code. Or if you did, what I saw wasn't the correct way to call a function.
To use DLookup, the statement usually looks like
You need the brackets when field names contain spaces. Offhand, I can't think of other reasons for a DLookup to fail for your case.
1. [Category] might not be the name of a field - unlikely, based on prior posts
2. [Company Name] might not be the name of a field - unlikely, based on prior posts
3. [Sales Tax Table] might not be the name of a table - unlikely, based on prior posts
4. Me.Name_Choose might not be the name of a control - not so clear, needs verification
5. The bound column for Me.Name_Choose isn't text - need to put a breakpoint so you can examine the value of Me.Name_Choose using the Debug.Print commend in the immediate window.
6. The control Me.Name_Choose is empty - can be verified same way as #5
7. You didn't give DLookup a destination. You didn't show us the code. Or if you did, what I saw wasn't the correct way to call a function.
To use DLookup, the statement usually looks like
Code:
variable = DLookup( "[field]", "[domain]", "criteria clauses" )
You need the brackets when field names contain spaces. Offhand, I can't think of other reasons for a DLookup to fail for your case.