|
|
Getting a subform control to requery
Main Form : F_BU
Subform1: F_BU_Cat2
SubForm2: F_BU_Cat3
When I click on one of the records in subform1 (field BillCat) the OnClick
event uses the value in the field as a criteria in a query that is used in
the combox (cbxCat3) in Subform 2. Here is the code I was trying to use:
Me.Parent!F_BU_Cat3.Form!cbxCat3.Requery
It was working for a while but now not when I click on the "BillCat" field in
Subform 1 I get: Method: Form" of Object ' _Subform' Failed.
--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-forms/201002/1
|
|
0
|
|
|
|
Reply
|
szag
|
2/18/2010 12:15:44 AM |
|
I find that in A2007, I am seeing this error message every now and then,
whereas in A2003 and earlier, it was very rare.
I have found that small things wrong can give this error message.
Does the code compile?
Have you checked that the combo has the correct record source?, the forms
have correct record sources?
Have you checked for correct names of the objects involved?
Have you checked to see if any of the forms involved have been corrupted,
perhaps the combo has become corrupted.
I can't remember all the things that can give this error.
Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
"szag via AccessMonster.com" <u2885@uwe> wrote in message
news:a3ca9b7cc5f36@uwe...
> Main Form : F_BU
> Subform1: F_BU_Cat2
> SubForm2: F_BU_Cat3
>
> When I click on one of the records in subform1 (field BillCat) the OnClick
> event uses the value in the field as a criteria in a query that is used in
> the combox (cbxCat3) in Subform 2. Here is the code I was trying to use:
>
> Me.Parent!F_BU_Cat3.Form!cbxCat3.Requery
>
> It was working for a while but now not when I click on the "BillCat" field
> in
> Subform 1 I get: Method: Form" of Object ' _Subform' Failed.
>
> --
> Message posted via AccessMonster.com
> http://www.accessmonster.com/Uwe/Forums.aspx/access-forms/201002/1
>
|
|
0
|
|
|
|
Reply
|
Jeanette
|
2/18/2010 8:10:31 AM
|
|
Thanks Jeanette - unfortunately I can't look at it right now but in the
meantime ...did the code look ok? I just picked that up from a differnet
thread.
Jeanette Cunningham wrote:
>I find that in A2007, I am seeing this error message every now and then,
>whereas in A2003 and earlier, it was very rare.
>I have found that small things wrong can give this error message.
>
>Does the code compile?
>Have you checked that the combo has the correct record source?, the forms
>have correct record sources?
>Have you checked for correct names of the objects involved?
>
>Have you checked to see if any of the forms involved have been corrupted,
>perhaps the combo has become corrupted.
>I can't remember all the things that can give this error.
>
>Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
>
>> Main Form : F_BU
>> Subform1: F_BU_Cat2
>[quoted text clipped - 9 lines]
>> in
>> Subform 1 I get: Method: Form" of Object ' _Subform' Failed.
--
Message posted via http://www.accessmonster.com
|
|
0
|
|
|
|
Reply
|
szag
|
2/18/2010 12:13:23 PM
|
|
Yes the code looked OK in a general way.
Now that I know you are adapting some other code, make sure you have the
correct name for the subform and the subform control.
Make sure that
Me.Parent!F_BU_Cat3.Form!cbxCat3.Requery
Is using the name of the subform control and not the name of the subform
inside the subform control.
The idea is shown below, substitute the name of your subform control.
Me.Parent.[NameOfSubformControl].Form.cbxCat3.Requery
Note that the subform may have a different name from the subform control.
Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
"szag via AccessMonster.com" <u2885@uwe> wrote in message
news:a3d0df5f22389@uwe...
> Thanks Jeanette - unfortunately I can't look at it right now but in the
> meantime ...did the code look ok? I just picked that up from a differnet
> thread.
>
> Jeanette Cunningham wrote:
>>I find that in A2007, I am seeing this error message every now and then,
>>whereas in A2003 and earlier, it was very rare.
>>I have found that small things wrong can give this error message.
>>
>>Does the code compile?
>>Have you checked that the combo has the correct record source?, the forms
>>have correct record sources?
>>Have you checked for correct names of the objects involved?
>>
>>Have you checked to see if any of the forms involved have been corrupted,
>>perhaps the combo has become corrupted.
>>I can't remember all the things that can give this error.
>>
>>Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
>>
>>> Main Form : F_BU
>>> Subform1: F_BU_Cat2
>>[quoted text clipped - 9 lines]
>>> in
>>> Subform 1 I get: Method: Form" of Object ' _Subform' Failed.
>
> --
> Message posted via http://www.accessmonster.com
>
|
|
0
|
|
|
|
Reply
|
Jeanette
|
2/18/2010 10:47:13 PM
|
|
|
3 Replies
634 Views
(page loaded in 0.095 seconds)
Similiar Articles: Getting a subform control to requery - microsoft.public.access ...Main Form : F_BU Subform1: F_BU_Cat2 SubForm2: F_BU_Cat3 When I click on one of the records in subform1 (field BillCat) the OnClick event uses t... Requery Subform - microsoft.public.access.formsThe Form property of the subform control has to be used anytime you are ... Getting a subform control to requery - microsoft.public.access ... Main Form : F_BU Subform1: F ... Form and SubForm-Control resizing to fit Form contained in SubForm ...Getting a subform control to requery - microsoft.public.access ... Form and SubForm-Control resizing to fit Form contained in SubForm ... Form has an option group and a ... Reference to subform control from another subform control ...Getting a subform control to requery - microsoft.public.access ... How to Get a Reference to a Subform's Parent Control: Microsoft ... How to Get a ... Referring to a control on a subform in a class module - microsoft ...Getting a subform control to requery - microsoft.public.access ... Referring to a control on a subform in a class module - microsoft ... How to Get a Reference to a ... Toggle View in SubForm - microsoft.public.access.formscoding ...Getting a subform control to requery - microsoft.public.access ... I have a subform with a tab control that I would like to toggle between form view ... Access 2003: Finding a parent subform control - microsoft.public ...Getting a subform control to requery - microsoft.public.access ... Access 2003: Finding a parent subform control - microsoft.public ... Getting a subform control to ... Requery method - microsoft.public.sqlserver.serverGetting a subform control to requery - microsoft.public.access ... OLE objects, such as charts . Controls for which the ControlSource ... The Repaint method simply ... Macro referencing a subform, in a tab, in a parent form ...Getting a subform control to requery - microsoft.public.access ... On that form is a tab control, and on that tab control is subform and another ... ... Move focus from parent form to subform - microsoft.public.access ...Getting a subform control to requery - microsoft.public.access ... Move focus from parent form to subform - microsoft.public.access ... Set the active control in the ... Getting a subform control to requery - microsoft.public.access ...Main Form : F_BU Subform1: F_BU_Cat2 SubForm2: F_BU_Cat3 When I click on one of the records in subform1 (field BillCat) the OnClick event uses t... Requery Macro Action - Microsoft Corporation: Software ...If a subform control has the focus, this action requeries only the source of the ... If you want to requery a control that isn't on the active object, you must use the ... Requery Method - Microsoft Corporation: Software, Smartphones ...Subform controls. OLE objects, such as charts. Controls for which the ControlSource ... example uses the Requery method to update the EmployeeList control: DoCmd.Requery ... ACC2000: Error with Requery Macro Action to Requery a Control on a ...When you use the Requery action in a Microsoft Access macro to requery a control on a subform, you receive the following error message: You can't use the ... Requery subform control - Microsoft AnswersHi, I am trying to requery a control in a subform using a 2010 requery macro with an AfterUpdate Event of another subform. I try to reference the Control as: 7/23/2012 5:51:38 PM
|
|
|
|
|
|
|
|
|