473,320 Members | 1,948 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

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

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
6 2231
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
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
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: DD | last post by:
I have a mainform with a subform. > The main form has a dropdown box "chooseMonth", in the afterupdate event > i requery the subform so all records with the same date are viewed. > Now i only want...
2
by: Gran | last post by:
Hi, Im using Access 97, and I have two subforms which have a total for the query'd data. I then go and total the two together on the main form. But, when one has no data it brings up an error. I...
5
by: Bob | last post by:
Hi Everybody I have a form called frmListBox that is connected to a table tblListBox. This is opened from a form called "frmInvoiceOrder" which has a subform called "zfrmInvoiceOrder" and...
2
by: John Baker | last post by:
Hi: I have a Pop Up form that involves a main form and sub form. The sub form has the results of a query on the main form. I need to automatically perform exactly he same action that takes...
6
by: Liz Malcolm | last post by:
Hello and Thanks in advance for any help. I am using Access 2000. I have a data entry form that opens a main form (using the On Click event of the combo box ) with tab controls and 1 subform on...
2
by: origin197511 | last post by:
Hello all... I'm having an issue with MSAccess 2000. I have a Form that holds records of my cartridge loads for a rifle and a subform that lists all groups that have been fired with that load. ...
4
by: midlothian | last post by:
Hello, I have conditional formatting set up on a subform based on a calculated value in the underlying query. For instance, if Sales are >$1000, the query displays "Yes," otherwise it displays...
6
by: Chris Larmer | last post by:
I have two subforms in my main form. In the main form I want the user to select a customer, class, and date range. The 2 subforms are similar. One is the history records in the recent past and the...
13
by: MLH | last post by:
I have a form, frmVehicleEntryForm. On it is a subform control named frmAddnlOwnrListSubForm. The subform control's source object is frmAddnlOwnrListSubForm. When I click on the subform control,...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.