473,549 Members | 2,592 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Refresh a subform within a subform within a Form

17 New Member
I have a "Dashboard" in a tool I am building which has a list of different buttons. Clicking on each button will display different subforms which show up in a window to the right of the menu.

One of these "Screens" has a subform which needs to be refreshed after updating one of the other "Screens." The problem is, the screens do not refresh when switching between screens with the menu buttons.

Is there a way to have the subform within the subform within my Dashboard to refresh with a button pressed on my Dashboard?

I have attached a screenshot of my Dashboard....

Thanks.
Attached Images
File Type: jpg untitled.JPG (21.8 KB, 446 views)
Mar 12 '08 #1
5 3315
NeoPa
32,564 Recognized Expert Moderator MVP
You may find Referring to Items on a Sub-Form helpful :)

You will need to call a ReQuery of the relevant subform.
Mar 13 '08 #2
bplantes
17 New Member
I have tried using the External Syntax as described in your thread. After updating a combobox on one of the SubForms (Form1 for example) within my dashboard I need it to update the subform within Form1... to do this I have the following code:

Expand|Select|Wrap|Line Numbers
  1.  
  2. Dim strQuery As String
  3.  
  4. strQuery = "SELECT * FROM TableName WHERE Criteria = " & combobox_Value
  5.  
  6. Forms!Dashboard.Form1.subfrmWithinForm1.RecordSource = strQuery
  7.  
  8. Forms!Dashboard.Form1.subfrmWithinForm1.Requery
  9.  
I get the following error at the .RecordSource Line:

"Object Doesn't Support This Property or Method"

I have assigned a RecordSource to a SubForm Before, so I am not sure of the problem. Any suggestions?

Thanks for the help.
Mar 13 '08 #3
NeoPa
32,564 Recognized Expert Moderator MVP
At a quick glance (all I have time for at the moment) I would guess that you are calling a ReQuery on the subform control on your form rather than the form that is in it.

This is covered in the HowTo so have another look. If you're still not able to get it to work then post back but include all the relevant details (names etc) of the items and I'll see what I can manage for you.
Mar 13 '08 #4
bplantes
17 New Member
I figured it out. I just used the "Me!subform " reference and it worked. I think I was trying to make the code more complicated than it needed to be. Thanks for the help.
Mar 13 '08 #5
NeoPa
32,564 Recognized Expert Moderator MVP
Easily done in complicated areas, and this is certainly one of those. Congratulations for finding the solution. Even better that it's a simple and neat solution :)
Mar 13 '08 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

0
2091
by: P Mitchell | last post by:
Hello I would like someone to be able to help with the updating of data in a lookup list in a subform. In short, is their a VB instruction that is the equivalent of performing the action of going to the menu and selecting Records and then Refresh? or To explain, based on a three table system where cars participate in rallies,
2
2319
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 place when I manually click "Records/refresh" when I update a field on the main form, but am having trouble making that happen. Me.Refresh does not do...
6
5468
by: Tim Marshall | last post by:
Here's the situation. A form, frmSetUp, with a subform control called subExplain with a source object form frmSetUpSubDefineSides. The source object is a bound form, displaying a few records, no edit, adds, filters, etc, are permitted on the subform. An add or edit button on the subform is clicked opening an unbound form, frmSetUpSideAdd,...
5
2479
by: Andrew Chanter | last post by:
I have a situation where I am using an unbound dialog form to update data in an Access 2002 split back end / front end scenario. The data update is done via an ADO call (direct to the back end db) when the user clicks the save button. The dialog then closes and the user should be able to see the result of their edit in a list view that now...
1
3516
by: hqdtech | last post by:
how to refresh webform from other webform I have 2 webform, i want if webform A was close then webform B wil refresh. And the problem second: how to catch packet on the network in C#. thanks
4
13124
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 "No." The conditional formatting is set up to read the 'Yes' or 'No' value and color the text accordingly. I have an event in the subform that...
1
5415
by: Stinky Pete | last post by:
Hi everyone, I have been updating a file that uses a main form that contains a subform (as a datasheet). The main form really does not do anything on opening except maximizes to the users screen size. The subform however runs an "embedded" query (cause I don't know the right term) to show a list of records based on the embedded query. ...
3
4267
by: ApexData | last post by:
COMBOBOX REFRESH DILEMMA ' I have been working for hours trying to figure out how to requery a combobox in a subform, from a Popup form ' that this subform had launched. Basically, I designed a form that pops up when the user dbl-clicks a combobox. ' This popup form displays the table that the combobox uses. The user can change the...
5
6594
by: kknb0800 | last post by:
Hi, I'm new to Access but I've searched for a long time for a solution but to no avail. What I'm trying to do is create an address database whereby the user is able to enter addresses through a form and then have the abilitly to generate address labels. I have 1 table called 'addresses'. Linked to this, I have a form called 'address...
0
7459
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7726
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7967
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7819
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
3505
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3488
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1953
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1064
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
772
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.