View Single Post
  #19  
Old November 27th, 2006, 02:10 PM posted to microsoft.public.access.forms
Rick Brandt
external usenet poster
 
Posts: 4,354
Default Subform controls: ARGH!

scubadiver wrote:
You have completely misunderstood. Add1c is just dummy data for me to
work with.

[Customer] and [address] are the fields I am using to do the search.
[CustomerName] and [address1] are the fields I am searching.

I explained it in my second response (11/23) when I copied the entire
code.

Do you understand what I am trying to achieve?

So if I select "Joe Bloggs" and his address, "5 Cedar House", I want
to press the button and find that particular record. As I said, the
code I used for an earlier version worked perfectly fine, but now
[address1] is now in a sub form, NOT on the main form. That is the
only difference so I can't see why the code won't work now.


If you have [CustomerName] in the main form and [address1] in a subform then
a single filter CANNOT find this record. A filter can only act on either
your main form OR your subform. You would have to apply a filter first on
the main form that only filters on [CustomerName]. If you have the main
form and subform linked properly then the subform will automatically then
display just the addresses that match the record in the main form. Then you
would have to apply a spearate filter to the subform to find the specific
address you want.

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com