requery form

livvie

Registered User.
Local time
Today, 21:46
Joined
May 7, 2004
Messages
158
I am trying to requery a subform in the oncurrent event of another form.
I am using the syntax provided by Mile-O-Phile on this site as follows
Me.Parent![fsubDrawRev].Requery
Forms!frmDrawings!fsubDrawRev.Form!fsubDrawRevsubform.Requery
The first requery works fine but the second one says I have an illegal reference to the form.
I have tried every variation of syntax I can think of but cannot get it to work. The second forn is a subform of the first form and the code is in a different subform.
 
forms!myMainFormName!mySubFormName.form.requery

???
kh
 
KenHigg said:
forms!myMainFormName!mySubFormName.form.requery

???
kh

No afraid not - "Cannot find the field named mySubFormName"
 
Are you substituting you objects names correctly:

forms!myMainFormName!mySubFormName.form.requery

myMainFormName = the name of your main form
mySubFormName = the name of your sub form as referenced from the main form as a control on the main form.

???
kh
 
Does seem like a proper parent/child link would do it... :confused:

kh
 
I have had to remove the parent cild link due to a problem with creating a new record (which I have tried multiple times to fix). SO this is the work around. I would prefer if my Parent/Child link was working properly
 
Just so you know.

There is a subform object which you put onto a form. Within this goes another form which becomes your subform. Be aware that your subject object and your subform do not need to have the same name and this might be where you are making your error.
 
livvie said:
I have had to remove the parent cild link due to a problem with creating a new record (which I have tried multiple times to fix). SO this is the work around. I would prefer if my Parent/Child link was working properly

Can you remove enough of the other stuff so that the db will be small enough to post. Maybe then we can help figure out the problem...

kh
 
Attached is a zip I made of it the last time I was trying to fix it.
There are some errors that you can ignore as they are caused by leaving stuff out.
When you open up the form , hit Add and then the error occurs when you try to type in a part number.
 

Attachments

Users who are viewing this thread

Back
Top Bottom