Requards to 2 part subform

J

JD

I don't understand the requery of a subform. The main
form is called custform and the sub form is called
addmaterials. I understand the concept behind the requery
but I can't seem to figure out how to make it work. The
subform accesses a table that has 3 fields in it custid,
material, & cost. If the subform displays the later 2
fields based on the custid matching the custid on the
custform how can you put any kind of control name into a
requery for the subform?
 
G

Gary Miller

JD,

I am very confused by this line...

" If the subform displays the later 2
fields based on the custid matching the custid on the
custform how can you put any kind of control name into a
requery for the subform?"

You may want to try and clarify the question a little if
what I say next doesn't answer you.

A requery forces a form to take a fresh look at the
recordset (table or query) that feeds it to see if anything
has been changed or added since it last looked. It is not
specific to any one control or field. When a main form is
requeried, the subform should requery itself as well
automatically. The syntax for forcing a requery is...

Me.Requery

--

Gary Miller
Gary Miller Computer Services
Sisters, OR
________________________
 
R

Ragnar Midtskogen

I am assuming that you want the subform to respond to moving the main form
from one record to the next?
If you set the Link Master Fields and Link Child Fields properties of the
subform the subform will automatically be requeried.

Ragnar
 

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