473,834 Members | 1,417 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Trying to requery a subform in access 2000 on an event

1 New Member
Hi all,

I am trying to requery a subform "frmOpenWorkOrd ers" when a value list "status" on my main form "frmWorkOrderMa in" is changed. If I change "status" then click on "frmOpenWorkOrd ers" and hit F9 I get the desired result. Which is the list on my subform is refreshed to show the new result of the query that populates the subform.

I have tried the following:

[code]
Private Sub Status_AfterUpd ate()
Me![frmOpenWorkOrde rs].Requery
Me.frmOpenWorkO rders.Requery
Forms![frmWorkOrderMai n]![frmOpenWorkOrde rs].Requery

End Sub
[code]

Not all at the same time of course. I have also tried each of the above in the on change event of status. I can do a requery on the main form so i know the syntax is close but the syntax to requery the subform is eluding me.

Any help would be very much appreciated.

Platform
Win XP
Access 2000/VBA

Thanks,
Mark
Jun 8 '07 #1
2 2770
ADezii
8,834 Recognized Expert Expert
Hi all,

I am trying to requery a subform "frmOpenWorkOrd ers" when a value list "status" on my main form "frmWorkOrderMa in" is changed. If I change "status" then click on "frmOpenWorkOrd ers" and hit F9 I get the desired result. Which is the list on my subform is refreshed to show the new result of the query that populates the subform.

I have tried the following:

[code]
Private Sub Status_AfterUpd ate()
Me![frmOpenWorkOrde rs].Requery
Me.frmOpenWorkO rders.Requery
Forms![frmWorkOrderMai n]![frmOpenWorkOrde rs].Requery

End Sub
[code]

Not all at the same time of course. I have also tried each of the above in the on change event of status. I can do a requery on the main form so i know the syntax is close but the syntax to requery the subform is eluding me.

Any help would be very much appreciated.

Platform
Win XP
Access 2000/VBA

Thanks,
Mark
You must Requery the Sub-Form ontrol itself NOT the Source Object which is the Form Name used in the Sub-Form Control.
Jun 8 '07 #2
FishVal
2,653 Recognized Expert Specialist
Hi all,

I am trying to requery a subform "frmOpenWorkOrd ers" when a value list "status" on my main form "frmWorkOrderMa in" is changed. If I change "status" then click on "frmOpenWorkOrd ers" and hit F9 I get the desired result. Which is the list on my subform is refreshed to show the new result of the query that populates the subform.

I have tried the following:

[code]
Private Sub Status_AfterUpd ate()
Me![frmOpenWorkOrde rs].Requery
Me.frmOpenWorkO rders.Requery
Forms![frmWorkOrderMai n]![frmOpenWorkOrde rs].Requery

End Sub
[code]

Not all at the same time of course. I have also tried each of the above in the on change event of status. I can do a requery on the main form so i know the syntax is close but the syntax to requery the subform is eluding me.

Any help would be very much appreciated.

Platform
Win XP
Access 2000/VBA

Thanks,
Mark

You can require subform in the following way.

Me![frmOpenWorkOrde rs].Form.Requery

Assumed that the subform control has the name "frmOpenWorkOrd ers".
Jun 9 '07 #3

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

Similar topics

1
2997
by: M Wells | last post by:
Hi All, I am developing an Access 2003 project application with the back end in SQL Server 2003. I have a master form that tracks projects, and several subforms on it that track various aspects of the project. On the masterform I have two unbound listboxes that I populate with information regarding the current record in one of the subforms.
2
6817
by: Gilz | last post by:
Hi Hope someone can help this is driving me round the bend. I have a form called "frmMain_People" with a tab control on it with 2 sub forms called "fsubMain_People_Enquiries_Live" and "fsubMain_People_Enquiries_Dead". These two subforms are based on queries with the criteria being for the live one EN_Date_Withdrawn is null and for the dead one
14
11474
by: Kurt | last post by:
I have an unbound main form with an unbound subform. frmProjects fsubProjectList Using combo boxes, the user can select several search criteria on frmProjects and then click a command button. The command button passes the criteria as a string to a query. A subform, which is based on this query, shows the results of the search.
2
3731
by: jpatchak | last post by:
I am experiencing two distinct problems with the Requery method in Access 2003. Problem 1: I have a series of text boxes on my form. The control sources of these text boxes are used in calculations in a query. The results of the query are displayed in a subform (continuous form) on my main form. I want the text boxes in the subform to update after any of the text boxes on the main form are updated. I have tried to requery the subform...
3
2122
by: Danny J. Lesandrini | last post by:
-- previously posted on newsgroup :: <microsoft.public.access-- Has anyone else noticed this behavior? Focus jumping from current cell to upper left in embedded datasheet. If not, would you be willing to test your environment and report back? I posted this question back in May because a client using our application reported it. We could only reproduce it on our network if we modified the configuration. Now, however, it's happening...
5
8117
by: ApexData | last post by:
I have a ComboBox, when dblClicked, displays the combobox's row content in a continuous subform. Changes can be made to this content in the subform and then closed. The ComboBox needs to be requeried to immediately reflect these changes. The problem is that I can't requery in the OnDblClick event of the ComboBox because the event completes once the subform is launched. I guess I could requery the combobox from the Close event of the...
4
17071
by: Robert | last post by:
Hello. I have a form with 2 subforms on it, subform1 and subform2. Is there some way to requery subform2 from an after update event on one of the fields on subform1? What would the syntax of that be? Me.Form.Subform.subform2.requery does not seem to work. Robert
11
7184
by: mrowe | last post by:
I am using Access 2003. (I am also using ADO in the vast majority of my code. I recently read a post that indicated that ADO is not all that is was initially cracked up to be. In the back of my mind I am wonder if this is causing my problem, but I don’t want to go through the work to convert to DAO unless I know it is truly in my best interest.) I am having problems getting a requery to show up consistently on a couple of forms. I have...
10
7182
beacon
by: beacon | last post by:
Hi everybody, This is probably going to sound unorthodox, but I have to log records that are deleted...I know, go figure. Anyway, I have a form with a (continuous) subform, and on the subform I have a command button, called cmdDelete, that launches a dialog form, called frmDeleteCurrentRecord, where the user has to enter their name and a reason. I have managed, through a ton of trial and tribulation, found a way to delete the current...
0
9796
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10790
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10505
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10214
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7755
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5624
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4425
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
2
3976
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3079
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.