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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|
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 |