A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Find Record in Subform



 
 
Thread Tools Display Modes
  #1  
Old May 12th, 2005, 03:57 AM
Shalyn
external usenet poster
 
Posts: n/a
Default Find Record in Subform

Hello,

I am using Access 2002. I have a main for that displays my records of Bills,
the LC Number, etc. When I click on the Find button, and look for a record on
the main form, it works fine. No problem if the fields are on the main form.

Now, for each main form, I have a subform that displays its Shipment details
(with a field called Invoice No.). Each Bill will have one or more Shipment.
If I do a find while I am still on the main form, to look for Invoice No.,
which is a field in the subform, I will not be able to find such record. It
will work if I enter into the Shipment subform and key in the Invoice No. But
the problem is users will not know where that particular Invoice No. resides.
So if I could do a search for the Invoice No. while on the main form, it
would be better.

So the question is, how do I seach for a record in the subform, while I am
still at the main form?

Appreciate any help.

Shalyn
  #2  
Old May 12th, 2005, 06:06 AM
Allen Browne
external usenet poster
 
Posts: n/a
Default

So you need to filter the main form so that it contains only those bills
that have the desired invoice number in the subform. The user can then flick
through the main form records quickly, to find the right one in the subform.

See:
Filter a Form on a Field in a Subform
at:
http://allenbrowne.com/ser-28.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Shalyn" wrote in message
...

I am using Access 2002. I have a main for that displays my records of
Bills,
the LC Number, etc. When I click on the Find button, and look for a record
on
the main form, it works fine. No problem if the fields are on the main
form.

Now, for each main form, I have a subform that displays its Shipment
details
(with a field called Invoice No.). Each Bill will have one or more
Shipment.
If I do a find while I am still on the main form, to look for Invoice No.,
which is a field in the subform, I will not be able to find such record.
It
will work if I enter into the Shipment subform and key in the Invoice No.
But
the problem is users will not know where that particular Invoice No.
resides.
So if I could do a search for the Invoice No. while on the main form, it
would be better.

So the question is, how do I seach for a record in the subform, while I am
still at the main form?

Appreciate any help.

Shalyn



  #3  
Old May 12th, 2005, 06:27 AM
Shalyn
external usenet poster
 
Posts: n/a
Default

Thanks Allen for your response. I tried that before I posted my question,
based on the question another person wrote in.

But for this solution, it creates a form header which I do not want. I would
wnat it to be as stright forward as with the Find control button already
provided by Access, to extend the search to a subform.

Shalyn

"Allen Browne" wrote:

So you need to filter the main form so that it contains only those bills
that have the desired invoice number in the subform. The user can then flick
through the main form records quickly, to find the right one in the subform.

See:
Filter a Form on a Field in a Subform
at:
http://allenbrowne.com/ser-28.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Shalyn" wrote in message
...

I am using Access 2002. I have a main for that displays my records of
Bills,
the LC Number, etc. When I click on the Find button, and look for a record
on
the main form, it works fine. No problem if the fields are on the main
form.

Now, for each main form, I have a subform that displays its Shipment
details
(with a field called Invoice No.). Each Bill will have one or more
Shipment.
If I do a find while I am still on the main form, to look for Invoice No.,
which is a field in the subform, I will not be able to find such record.
It
will work if I enter into the Shipment subform and key in the Invoice No.
But
the problem is users will not know where that particular Invoice No.
resides.
So if I could do a search for the Invoice No. while on the main form, it
would be better.

So the question is, how do I seach for a record in the subform, while I am
still at the main form?

Appreciate any help.

Shalyn




  #4  
Old May 12th, 2005, 06:45 AM
Allen Browne
external usenet poster
 
Posts: n/a
Default

You cannot use the Find dialog, because the record is not in the subform to
find.

It is not there until you locate the right record(s) in the main form, so
you will need to use code to do that. If you prefer the interface, you can
create a small unbound pop-up form instead of a control in the form header,
and use similar code to find the right record(s) in the main form, and then
find in the subform.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Shalyn" wrote in message
...
Thanks Allen for your response. I tried that before I posted my question,
based on the question another person wrote in.

But for this solution, it creates a form header which I do not want. I
would
wnat it to be as stright forward as with the Find control button already
provided by Access, to extend the search to a subform.

Shalyn

"Allen Browne" wrote:

So you need to filter the main form so that it contains only those bills
that have the desired invoice number in the subform. The user can then
flick
through the main form records quickly, to find the right one in the
subform.

See:
Filter a Form on a Field in a Subform
at:
http://allenbrowne.com/ser-28.html


"Shalyn" wrote in message
...

I am using Access 2002. I have a main for that displays my records of
Bills,
the LC Number, etc. When I click on the Find button, and look for a
record
on
the main form, it works fine. No problem if the fields are on the main
form.

Now, for each main form, I have a subform that displays its Shipment
details
(with a field called Invoice No.). Each Bill will have one or more
Shipment.
If I do a find while I am still on the main form, to look for Invoice
No.,
which is a field in the subform, I will not be able to find such
record.
It
will work if I enter into the Shipment subform and key in the Invoice
No.
But
the problem is users will not know where that particular Invoice No.
resides.
So if I could do a search for the Invoice No. while on the main form,
it
would be better.

So the question is, how do I seach for a record in the subform, while I
am
still at the main form?



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Subform Refresh Problem (but only with an unbound combo box control) Barry Skidmore Using Forms 1 December 21st, 2004 01:19 AM
subform / form Rich J Using Forms 6 December 10th, 2004 12:25 AM
Subform new record setfocus Candiz Using Forms 1 November 19th, 2004 03:57 PM
subform's field and corresponding recordset out of sync? AB General Discussion 3 November 8th, 2004 10:54 PM
Find Record in Subform Katherine R General Discussion 7 June 26th, 2004 03:22 PM


All times are GMT +1. The time now is 01:42 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.