Couple of hopefully quick form/DLookup questions:
On a form, I'm attempting to handle user input for an ID table value using Access 2000.
Here's the thing:
I have a query that goes and looks up a valid ID number that can be input from the form.
I've bound this query to a combo box, and I've used the "Limit to List" option and it essentially works great.
I need to reconsider this option, though, and see if I can get the same, or similar functionality using just a single text box INSTEAD of the combo box.
My original idea was to hang on to my combo box or query and then somehow use a lookup or DLookup function (albeit based on a query which links the two required tables I need to check for a valid non-matching ID, which I don't think is possible to reference using Dlookup...)
I suppose I could use a MakeTable query to create a temp table, then use Dlookup to get info from that, but my critical $10000 question is:
1. Is it at all POSSIBLE to do a Dlookup from a QUERY instead of a TABLE?
A simple yes or no will do.
If yes, well, I'd like to know better how to go about doing that with some terse examples, because I get a 2471 error when I use a query name within the Dlookup code, which seems to suggest that that option isn't available.
2. Also, what does DLookup OUTPUT? Is it a value, a t/f, a variant, a string, what?
I can provide examples if necessary, but I've already gone through the syntax checking and read the FAQs here locally on Dlookup syntax.
If no, well, no worries - I'll just have to try and figure something else.
Thanks in advance.
marcus101
Access/SQL/XML Developer
Ottawa, Canada
On a form, I'm attempting to handle user input for an ID table value using Access 2000.
Here's the thing:
I have a query that goes and looks up a valid ID number that can be input from the form.
I've bound this query to a combo box, and I've used the "Limit to List" option and it essentially works great.
I need to reconsider this option, though, and see if I can get the same, or similar functionality using just a single text box INSTEAD of the combo box.
My original idea was to hang on to my combo box or query and then somehow use a lookup or DLookup function (albeit based on a query which links the two required tables I need to check for a valid non-matching ID, which I don't think is possible to reference using Dlookup...)
I suppose I could use a MakeTable query to create a temp table, then use Dlookup to get info from that, but my critical $10000 question is:
1. Is it at all POSSIBLE to do a Dlookup from a QUERY instead of a TABLE?
A simple yes or no will do.
If yes, well, I'd like to know better how to go about doing that with some terse examples, because I get a 2471 error when I use a query name within the Dlookup code, which seems to suggest that that option isn't available.
2. Also, what does DLookup OUTPUT? Is it a value, a t/f, a variant, a string, what?
I can provide examples if necessary, but I've already gone through the syntax checking and read the FAQs here locally on Dlookup syntax.
If no, well, no worries - I'll just have to try and figure something else.
Thanks in advance.
marcus101
Access/SQL/XML Developer
Ottawa, Canada