You're thinking in terms of Excel. Excel and Access are fundamentally
different. You don't need a Lookup anywhere. Just add the two tables
to the QBE grid, join them if you need to, and drop in the fields you
wnat to see in your output.
Ebitari - 16 Jul 2007 19:46 GMT
Great. Thanks. I figured it out.
> You're thinking in terms of Excel. Excel and Access are fundamentally
> different. You don't need a Lookup anywhere. Just add the two tables
> to the QBE grid, join them if you need to, and drop in the fields you
> wnat to see in your output.
Ebitari - 16 Jul 2007 19:58 GMT
what was confusing me with the joins is that when you add a table to the
query it automatically joins then in ID. I had to delete the ID join and
join on [Invoice Number]. That worked.
Thanks.
> You're thinking in terms of Excel. Excel and Access are fundamentally
> different. You don't need a Lookup anywhere. Just add the two tables
> to the QBE grid, join them if you need to, and drop in the fields you
> wnat to see in your output.
>I have a table [Invoice Overview Data Table] which has a field [Open/Closed]
>in it. This overview Data Table holds the general information about the data
[quoted text clipped - 20 lines]
>
>Is there another function I should be using?
As Piet says, you should be using Access as a relational database, rather than
as Excel on steroids. You don't need ANY function at all. Just create a Query
joining the two tables on the Invoice Number field; you then have all the
fields in both tables available.
Just FWIW, the reason your DLookUp didn't work is that it retrieved all those
records from [Invoice Overview Table] for which the value of Invoice Number
was equal to itself - that is, all records. It then returned the first one.
If (and this *can* happen) you need to use a DLookUp on one table in a query
based on another table, you need to take the search criterion - the Invoice
Number in Invoice Data Table - "out" of the quotes, so that the dlookup is
comparing the value in the current record of the query with the values in the
table:
Open/Closed: DLookUp("[Invoice Overview Table]![Open/Closed]","[Invoice
Overview Table]","[Invoice Overview Table]![Invoice Number]=" & [Invoice
Number])
John W. Vinson [MVP]
Ebitari - 16 Jul 2007 19:46 GMT
Great. Thanks for your help. Very useful.
> >I have a table [Invoice Overview Data Table] which has a field [Open/Closed]
> >in it. This overview Data Table holds the general information about the data
[quoted text clipped - 41 lines]
>
> John W. Vinson [MVP]
Ebitari - 16 Jul 2007 20:00 GMT
Thanks for your help with this. Could you also look at my issue titled
'Visual Basic Code to open a folder in Code builder'?
I haven't had any replies about this one.
Thanks.
> >I have a table [Invoice Overview Data Table] which has a field [Open/Closed]
> >in it. This overview Data Table holds the general information about the data
[quoted text clipped - 41 lines]
>
> John W. Vinson [MVP]
UpRider - 16 Jul 2007 22:53 GMT
Probably the best you can do is to hit F5 when Explorer has the focus. That
will update the display.
HTH, UpRider
> Thanks for your help with this. Could you also look at my issue titled
> 'Visual Basic Code to open a folder in Code builder'?
[quoted text clipped - 67 lines]
>>
>> John W. Vinson [MVP]