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

A97 delay between subform field update and actual table update...

MLH
If the RecordSource for subform SF on main form MF
is a query and I change one of the field values in the
subform control from 75 to say - 13 and click on another
record, the value in the underlying table is changed. It
can be verified by opening the underlying table directly
from the database window and looking at the record.

But if I set the AfterUpdate property of the control on
SF to a VBA procedure that pops a msgbox up which
displays the control value on the subform #AND# the
table field value read using DLookUp - the table value
shown is still the old value. True enough, the value of
Forms!SF!MyTextBox is 13. But the one read from the
table is still 75. I've found this to be the case regardless
of whether the MsgBox command is preceeded by a
DoEvents command.

My Question: Is there ANY VBA method or procedure
I can implement that would ensure me that both values,
when read, would reflect the NEW value of 13. I mean -
short of ending the procedure, having coffee & donuts
and coming back afterward?
Dec 17 '07 #1
1 2129
On Mon, 17 Dec 2007 11:10:12 -0500, MLH <CR**@NorthState.netwrote:

You're assuming that Control_AfterUpdate will write that value to the
db. That's not so. Rather after Form_AfterUpdate you may expect the
value to be in the table.
If you want the -not yet saved- value, you can inspect the Text
property of that control when it has focus.

-Tom.

>If the RecordSource for subform SF on main form MF
is a query and I change one of the field values in the
subform control from 75 to say - 13 and click on another
record, the value in the underlying table is changed. It
can be verified by opening the underlying table directly
from the database window and looking at the record.

But if I set the AfterUpdate property of the control on
SF to a VBA procedure that pops a msgbox up which
displays the control value on the subform #AND# the
table field value read using DLookUp - the table value
shown is still the old value. True enough, the value of
Forms!SF!MyTextBox is 13. But the one read from the
table is still 75. I've found this to be the case regardless
of whether the MsgBox command is preceeded by a
DoEvents command.

My Question: Is there ANY VBA method or procedure
I can implement that would ensure me that both values,
when read, would reflect the NEW value of 13. I mean -
short of ending the procedure, having coffee & donuts
and coming back afterward?
Dec 17 '07 #2

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

Similar topics

2
by: Galina | last post by:
Hello I have an application in MS Access 2000. I have a form, which includes a subform. The subform is based on a table, but locked for any editing. There is Edit button. When clicked, it starts a...
25
by: Lyn | last post by:
Hi, I am working on a genealogy form. The only table (so far) lists everybody in the family, one record per person. Each record has an autonum ID. The parent form (frmMainForm) displays the...
0
by: Galina | last post by:
Hello I have an application in MS Access 2K. A form contains 2 subforms. Each subform is based on it's own table. One table contains a field Total. Another one contains a field Points. The field...
1
by: MLH | last post by:
I have a form with a subform control on it listing records returned by a saved query named UnbilledVehicles. I would like to put command buttons on the main form to apply dynamic filters to the...
9
by: Ecohouse | last post by:
I have a main form with two subforms. The first subform has the child link to the main form identity key. subform1 - Master Field: SK Child Field: TrainingMasterSK The second subform has a...
13
by: Mary | last post by:
I'll pulling my hair out on this one and would be so appreciative of any help. I am creating a data entry form to enter results of a student survey. There are 40 questions on the survey. The...
3
by: virtualgreek | last post by:
Dear all, I have a scenario that is driving me nuts. (MS Access 2003) I have a form/subform (Continuous form) where it gets its data from tables Order and Order_Details. In the footer...
3
by: Richnep | last post by:
Hi all, I have tabbed subforms where I need to copy one field value from one subform over to another subform. Although I can run an update query to accomplish this I would like to do it through...
2
by: dbstrat | last post by:
Hi. I have 3 tables that I need to display on a master-child form/subform. Think of it as Orders and Order Details. The tables are Orders OrderDetails VendorItems
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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...
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,...

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.