473,947 Members | 3,119 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Can't get subform on tab control to requery

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_Peopl e_Enquiries_Liv e" and
"fsubMain_Peopl e_Enquiries_Dea d".

These two subforms are based on queries with the criteria being for the
live one EN_Date_Withdra wn is null and for the dead one
EN_Date_Withdra wn is not null.

When you are on the subform "fsubMain_Peopl e_Enquiries_Liv e" and then
fill in the withdrawn date ie making it dead i can't get the subform to
requery therefore moving the record to the dead form.

I put in the after update event of EN_Date_Withdra wn : me.form.requery

me!form.requery

forms!fsubMain_ People_Enquirie s_Live.requery

And i can't get anything to make the record move from the live subform
to the dead subform with out going forward and back a record.

Thanks for any help.

Gillian

Dec 14 '05 #1
2 6821
KK
I think you should try putting an UPDATE button in the bottom of the
form and run the code from there. That will take care of it.
Personally I think its not a good idea to put it in the after update
event of the date box, as the record will 'vanish' soon after you come
out of it. The update button will give the user a chance to edit the
date, if there was a mistake in entering or delete it if needed.
Gilz wrote:
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_Peopl e_Enquiries_Liv e" and
"fsubMain_Peopl e_Enquiries_Dea d".

These two subforms are based on queries with the criteria being for the
live one EN_Date_Withdra wn is null and for the dead one
EN_Date_Withdra wn is not null.

When you are on the subform "fsubMain_Peopl e_Enquiries_Liv e" and then
fill in the withdrawn date ie making it dead i can't get the subform to
requery therefore moving the record to the dead form.

I put in the after update event of EN_Date_Withdra wn : me.form.requery

me!form.requery

forms!fsubMain_ People_Enquirie s_Live.requery

And i can't get anything to make the record move from the live subform
to the dead subform with out going forward and back a record.

Thanks for any help.

Gillian


Dec 14 '05 #2
Gillian,
I think you are 99% of the way there.
In your main form both subforms have are controls and have names. Lets
call them sfLive and sfDead for this.
On after update event for the live form try
me.requery
me.parent.sfDea d.form.requery
Now remember that after_update only happens when you leave the record
you are editing. In order to facilitate this easily you can add a save
button for the user that has the code 'docmd.runcomma nd
accmdsaverecord '
HTH

Dec 14 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
4804
by: William Wisnieski | last post by:
Hello Everyone, Access 2000 I have a main form with a continuous subform. On the main form I have a text box that references a field on the subform. What I'd like it to do is show the value in the field of the last record entered on the subform. But what its doing is referencing whatever record the user clicked on last before closing all the forms. Also if the user cleared the subform field, I would like the text box on the main...
1
680
by: sixsoccer | last post by:
I have built a database with a <Mainform> and a <Subform>. My problem is twofold. 1. My subform is set as a continuos form with AllowAddiotions set to NO (ie. a list of Issues to the client on the mainform) 2. To add new issues, a button is used and a pop-up form is used to add an issue with more detail than what's available on the subform. 3. On accepting the new Issue from the pop-up the pop-up closes and you are returned to the...
12
19036
by: MLH | last post by:
I have created two forms: frmBrowseNegsMainform and frmBrowseNegsSubform. I put a subform control on the first of these. The SourceObject property for the subform control is, of course, frmBrowseNegsSubform. I would like to perform an ascending or descending sort on any of the 7 columns shown in datasheet view in the subform control. I've been unsuccessful. Is there something tricky about sorting in subform controls?
4
4577
by: mooseshoes | last post by:
All: Form A: Main_Form Form B: Sub_Form (has the control name: Sub_Form_Control_Name) Form C: Independent_Form Form C is based on a table which is also used by Form B. When Form C is used to update the table I want to requery and redisplay the data in Form B.
1
4456
by: phaddock4 | last post by:
Being fairly inexperienced at Access 2000, i've been reading many posts here for the last several days, and testing myself to find the best approach to do the following in A2K: SET UP: I have created a MainTable (and related form), which has an associated SubForm (popup) along with its underlying, separate Table. The tables' relationship is one to many respectively. The primary key
1
4901
by: MLH | last post by:
I have frmVehicleEntryForm and on it is frmAddnlOwnrListSubForm. The subform is unbound and lists records in a table, allowing the user to change values in CheckMark controls on the subform as desired. I have another button that will allow user to run a query which will update the field values related to the checkmark control to False. To be sure the changed values show up in the subform control, I'm thinking of running a line like the...
1
2516
by: BartonConstruction | last post by:
Greetings all, I have a main form (frmClients) with two subforms (subVisits) (subAccount). I got the subforms to reflect what the main form is showing by linking master and child fields (I think--newbie here). Now I need the second subform (subAccount) to update when I add a visit in the subVisits subform. I assume that the AfterUpdate would do it, but I cant figure out what the code is to update another subform would be. Not...
1
9478
by: Parasyke | last post by:
I have a subform within a tabpage that will requery/refresh (?) if I press F9 and it will update the data in the subform, but I have tried various combinations of Me!SubformName.requery Me!Forms!Subformname.requery, etc. to put the F9 functionality into VBA code but nothing seems to work... any ideas? Thanks!
2
1762
by: Mike | last post by:
Hi guys, i have a form(myform) where i connected a pair of comboboxes for managers and supervisers, so when you choose a manager the second combo shows only those supervisors who report to him. So i had a query for supervisors list where i put a condition under managers name: !! and also an after update requery Me.FA_supervisor.Requery. SO everything worked fine. Then i had to add more text boxes and combos to my form and it became
0
10164
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
9986
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11577
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
11174
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
10694
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...
0
9896
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6118
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...
2
4540
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3544
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.