473,416 Members | 1,660 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,416 software developers and data experts.

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_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
EN_Date_Withdrawn is not null.

When you are on the subform "fsubMain_People_Enquiries_Live" 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_Withdrawn : me.form.requery

me!form.requery

forms!fsubMain_People_Enquiries_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 6788
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_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
EN_Date_Withdrawn is not null.

When you are on the subform "fsubMain_People_Enquiries_Live" 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_Withdrawn : me.form.requery

me!form.requery

forms!fsubMain_People_Enquiries_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.sfDead.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.runcommand
accmdsaverecord'
HTH

Dec 14 '05 #3

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

Similar topics

2
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...
1
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...
12
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,...
4
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...
1
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...
1
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...
1
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...
1
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...
2
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....
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
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,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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...
0
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,...
0
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...

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.