473,473 Members | 2,274 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Continuous Form

Hi All,
In Access97 I have a form setup as a continuous form several of the
bound controls have calculations that are done in the 'after update'
event via VBA code and all works fine.

My problem/question is if a user needs to go back to a previous line to
change a value who do I get the preceding lines to re-calculate. Since
a continuous form is more like a single record its confusing me.
example: on the continuous form I'm entering line/rows(whichever you
call them) and on line/row 10 and I notice that back on line/row 4 I
entered a value wrong. So, I click in the control and correct the value
and when I press 'enter' to kick off the 'after update' event code,
only line/row 4 adjusts. Lines/rows 5 thru 10 do nothing. Is it
possible to get them to update/adjust as well.
thanks
bobh.

Jan 6 '06 #1
2 2674
bobh wrote:
Hi All,
In Access97 I have a form setup as a continuous form several of the
bound controls have calculations that are done in the 'after update'
event via VBA code and all works fine.

My problem/question is if a user needs to go back to a previous line to
change a value who do I get the preceding lines to re-calculate. Since
a continuous form is more like a single record its confusing me.
example: on the continuous form I'm entering line/rows(whichever you
call them) and on line/row 10 and I notice that back on line/row 4 I
entered a value wrong. So, I click in the control and correct the value
and when I press 'enter' to kick off the 'after update' event code,
only line/row 4 adjusts. Lines/rows 5 thru 10 do nothing. Is it
possible to get them to update/adjust as well.
thanks
bobh.


You might want to set a flag if a recalc needs to be performed. If the
recalc flag is true, then perform the recacl.

In the BeforeUpdate event you might want to check if the record is new.
If so, the flag is false. IOW, check if the record is NOT new. You
can use OldValue to determine if the values have changed. OldValue is
only good for bound (to the table) controls.

If Not Me.NewRecord Then
If Me.Field1 <> Me.Field1.OldValue or _
Me.Field2 <> Me.Field2.OldValue then
blnRecalc = True
Endif

Now create a sub or function to recalc. It's possible that your form is
sorted or filtered so if you do a recalc, you could first set the order
to the way you expect it and remove any filters. Then set a recordset
to the form's recordset, go to the record in the recordset you are on in
the form and loop to the end, recalcing. Once done, restore the filter
and sort.
Jan 6 '06 #2
Ok, Thanks.

Jan 9 '06 #3

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

Similar topics

3
by: Prakash Wadhwani | last post by:
Is there any EASY way to highlight a full row in a continuous form so that as i navigate up & down the table/continuous form using the arrow keys, the entire line (all fields) get highlighted ? ...
3
by: B | last post by:
I know there are several ways to speed up combo boxes and form loading. Most of the solutions leave rowsource of the combo box blank and set the rowsource to a saved query or an SQL with a where...
3
by: Damian | last post by:
Hi. Is there a way to programatically populate a continuous form? I have an array of descriptions that I want to display in the continuous form and I have a textbox on the form called...
3
by: Mark | last post by:
Hi there, I have a subform, set as a continuous form. When a user selects a particular record in that subform, how can I make that particular record stand out (color or font change, size, etc) from...
3
by: David | last post by:
Hi, I need a button shown for each record (cont. form) with specific captions on each. I have a notes form for each record. When a user presses the button they can read the notes. I want to...
3
by: Richard Hollenbeck | last post by:
I have the following query in my form's code: Private Function Get_Data(fieldNum As Integer) Dim strSQL As String Dim db As DAO.Database Dim rs As DAO.Recordset strSQL = "SELECT & "", "" & ...
4
by: Kathy | last post by:
What is the standard technique for handling the fields in the following scenario on a continuous form? Multiple Divisions. Each Division has multiple Buildings. Each Building has a Supervisor. ...
11
by: Doug Bell | last post by:
Hi, I am trying to create form that displays data like an Access continuous dataform rather than using a data grid. I am thinking that I can achieve this by creating a row of text boxes, one...
2
by: Steve | last post by:
I have a continuous form showing Product Code and Product Name. Product Code is five digits and is sequential. I have a textbox in the form header. What is the code to scroll the continuous form so...
8
by: Steffen Beck | last post by:
Hi NG I need some help with a problem on my forms. If I have 2 related tables, for instance companies and employees, and want to display all companies on a continuous form with their...
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,...
1
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...
1
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...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
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...
0
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 ...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
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...

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.