Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / General 1 / June 2006

Tip: Looking for answers? Try searching our database.

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

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
MLH - 15 Jun 2006 14:26 GMT
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?
MLH - 15 Jun 2006 14:34 GMT
Excuse me... I meant Requery  ==>  not Refresh

>I don't always get what I want when I invoke the following
>
[quoted text clipped - 7 lines]
>
>Comments?
MLH - 15 Jun 2006 14:55 GMT
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???
Rick Wannall - 15 Jun 2006 15:11 GMT
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.
MLH - 15 Jun 2006 19:56 GMT
Understood perfectly. I was
running into probs because
my main form was not bound.

I have used a work-around.

Thx.
salad - 15 Jun 2006 16:22 GMT
> 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
MLH - 15 Jun 2006 19:56 GMT
Understood perfectly. I was
running into probs because
my main form was not bound.

I have used a work-around.

Thx.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.