Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sub-Sub-Subform Requery

Status
Not open for further replies.

jvhazelbaker

Programmer
Dec 15, 2004
38
US
I am having a problem with the requery feature yet again. Please let me know if you can help.

Main form = Barrel Purchase Order Query Form

Subform = Brand Event Table2 Form

Sub-Subform = Barrel Pick Form

Sub-Sub-Subform = Size and Case Detail

Field to be required = Full Brand Description

The main form runs off a query. No problems with that. When the form is opened it asks for a specific ID. That ID pulls the one record only. That record is the customer. The customer has chosen two different brands he/she would like to buy. Those have been selected in a previous form and stored in an underlying table. The subform is linked to the main form so the brands pull in a single form view, one per page. In the sub-sub-subform, there is a list of different sizes per brand. These are listed in datasheet view and chosen by a combo box. I want these to be requeried per the brand listed on the subform. When the user goes to the next brand (or record) in the subform, that combo box should requery based on the new brand in the subform.

I know that programmers generally try to use code to get this stuff to work. However, I let the program do the work for me. I have a Requery macro. The control source is supposed to only contain the name of the field to be requeried. However, since the field is on the sub-sub-subform, I am assuming the full name has to be given. I have done the following different syntax versions:

Forms![Brand Event Table2 Form]![Size and Case Detail]

Forms![Brand Event Table2 Form]![Size and Case Detail].[Full Brand Description]

Forms![Size and Case Detail]![Full Brand Description]

Forms![Size and Case Detail].[Full Brand Description]

I have also tried different codes. Nothing works. Is my syntax incorrect? Should I be doing the code rather than the macro? When I write the code rather than the macro, it gives me an error that my macro can’t be found. Any suggestions? Is it because I’ve left out the sub-subform?
 
How are ya jvhazelbaker . . . . .

Try this:
Code:
[blue]Forms![Barrel Purchase Order Query Form]![Brand Event Table2 Form][purple][b].Form[/b][/purple]![Barrel Pick Form][purple][b].Form[/b][/purple]![Full Brand Description][purple][b].Requery[/b][/purple][/blue]

Calvin.gif
See Ya! . . . . . .
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top