Requery problem

B

Bob Hughes

I have a form with 2 subforms
subform 2 updates the data behind subform 1 which I would like to see
reflected in that subform

I have tried
Forms.FrmMain.FrmSub1.Requery

but the system gives me
run-time error 2464
Application-defined or object-defined error

How should I do this?

Bob
 
D

DebbieG

If you are in the Main form:

me!subfrm1.form.requery

If you are in subform 2:

forms!frmMain!subfrm1.form.requery

At least I think I've got the syntax right. Good luck!

HTH,
Debbie


|I have a form with 2 subforms
| subform 2 updates the data behind subform 1 which I would like to see
| reflected in that subform
|
| I have tried
| Forms.FrmMain.FrmSub1.Requery
|
| but the system gives me
| run-time error 2464
| Application-defined or object-defined error
|
| How should I do this?
|
| Bob
| --
| TO reply via e-mail, change the xxx in the address to bob_
 
B

Bob Hughes

Thanks Debbie but,

from my SubFrm2 the code

Forms!frmOrder!SubFrmOrder.Form.Requery

gives me
stores can't find the field 'SubFrmOrder' refered to in your expresion

If I try
Forms.Frmorder.SubFrmOrder.Form.Requery
I get the same error as befor.

any other suggestions?

Bob
 
D

DebbieG

My only other suggestion is ... are you sure the subform control is called SubFrmOrder?

If you click on the subform object (SubFrmOrder) on the main form (frmOrder), open the Properties and see what the name is. It
might be different than the Source Object.

That's my best guess.

Debbie


| Thanks Debbie but,
|
| from my SubFrm2 the code
|
| Forms!frmOrder!SubFrmOrder.Form.Requery
|
| gives me
| stores can't find the field 'SubFrmOrder' refered to in your expresion
|
| If I try
| Forms.Frmorder.SubFrmOrder.Form.Requery
| I get the same error as befor.
|
| any other suggestions?
|
| Bob
|
| |
| > If you are in the Main form:
| >
| > me!subfrm1.form.requery
| >
| > If you are in subform 2:
| >
| > forms!frmMain!subfrm1.form.requery
| >
| > At least I think I've got the syntax right. Good luck!
| >
| > HTH,
| > Debbie
| >
| >
| > | >|I have a form with 2 subforms
| >| subform 2 updates the data behind subform 1 which I would like to see
| >| reflected in that subform
| >|
| >| I have tried
| >| Forms.FrmMain.FrmSub1.Requery
| >|
| >| but the system gives me
| >| run-time error 2464
| >| Application-defined or object-defined error
| >|
| >| How should I do this?
|
| --
| TO reply via e-mail, change the xxx in the address to bob_
 
B

Bob Hughes

Thank you, thank you. I Should have known, But!

All is working now. Its amazing how these silly things can hold you up.

Bob
 
M

Marshall Barton

Bob said:
Thanks Debbie but,

from my SubFrm2 the code

Forms!frmOrder!SubFrmOrder.Form.Requery

gives me
stores can't find the field 'SubFrmOrder' refered to in your expresion


Check that you are using the name of the subform **control**
on the main form, not the name of the form object displayed
in the subform control.
 
D

DebbieG

Bob, glad it's working. I've had many silly things hold me up!
Debbie


| Thank you, thank you. I Should have known, But!
|
| All is working now. Its amazing how these silly things can hold you up.
|
| Bob
|
| |
| > My only other suggestion is ... are you sure the subform control is
| > called SubFrmOrder?
| >
| > If you click on the subform object (SubFrmOrder) on the main form
| > (frmOrder), open the Properties and see what the name is. It might be
| > different than the Source Object.
| >
| > That's my best guess.
| >
| > Debbie
| --
| TO reply via e-mail, change the xxx in the address to bob_
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top