By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,537 Members | 1,750 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,537 IT Pros & Developers. It's quick & easy.

Sometimes when I attempt to refresh records in a subform control on the main form - it doesn't work

P: n/a
MLH
I don't always get what I want when I invoke the following

Me!MySubFormControl.Refresh

from code running in the main form. Am I doing something
wrong here? Someone suggested that I open the subform
itself (as a separate form) in hidden view anytime I open
the main form and attempt my refreshes there. I think that
is somewhat redundant and can't be what MicroSoft intended.

Comments?
Jun 15 '06 #1
Share this Question
Share on Google+
6 Replies


P: n/a
MLH
Excuse me... I meant Requery ==> not Refresh

On Thu, 15 Jun 2006 09:26:12 -0400, MLH <CR**@NorthState.net> wrote:
I don't always get what I want when I invoke the following

Me!MySubFormControl.Refresh

from code running in the main form. Am I doing something
wrong here? Someone suggested that I open the subform
itself (as a separate form) in hidden view anytime I open
the main form and attempt my refreshes there. I think that
is somewhat redundant and can't be what MicroSoft intended.

Comments?


Jun 15 '06 #2

P: n/a
MLH
Also... Tried to use Link Master Fields and Link Child Fields.
A97 err'd saying "Can't build a link between unbound forms"
Not quite sure how to bind 2 forms. Hmmm???
Jun 15 '06 #3

P: n/a
You don't exactly "bind 2 forms".

To form a link between two forms at least one of the forms must have a
recordsource. It must be "bound to" a source a of data. Both forms can be
bound to data, but only one must.

The link comes from having some value on one form (such as a customer key,
an order key, a class key) used to retrieve records to be displayed in the
other form. If "the other form" is not bound to a recordsource, there ARE
no records to retrieve and so the definition of a link between them becomes
meaningless.

The typical arrangement is to have a main form that is either bound to some
data (customer table, order table, etc) or is unbound but presents a listbox
or combobox that you use to select some record for which you want to view
data out of another table.
Jun 15 '06 #4

P: n/a
MLH wrote:
Also... Tried to use Link Master Fields and Link Child Fields.
A97 err'd saying "Can't build a link between unbound forms"
Not quite sure how to bind 2 forms. Hmmm???


Why not Use Filter/FilterOn?

You are on a record on MainForm. There's a field you can link to called ID.

Forms!MainForm!Subform.Form.Filter = "ID = " & Me.ID
Forms!MainForm!Subform.Form.FilterOn = True
Jun 15 '06 #5

P: n/a
MLH
Understood perfectly. I was
running into probs because
my main form was not bound.

I have used a work-around.

Thx.
Jun 15 '06 #6

P: n/a
MLH
Understood perfectly. I was
running into probs because
my main form was not bound.

I have used a work-around.

Thx.
Jun 15 '06 #7

This discussion thread is closed

Replies have been disabled for this discussion.