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

Home Posts Topics Members FAQ

How do I index individual text boxes in Access Continuous Form?

Im trying to get the name of a bound control on a continuous form in
Access. So that I can get the value of any text field.

This is what Im looking to do....

The user enters a value for number of entries for a specific month in
column1, column2 is the value for number of entries used Year to Date.
So I am looking to calculate column2 with the value of the current
column1 plus the value of the previous records column2.

Confused yet?

Example...

Col1 Col2
------------------------------------
5 5
2 7
3 10
5 15

so user enters.... 4 for next record in col1 hence col2 should be
calculated to 19. I attempted to code a work around which when the
user lost focus on col1 I went move previous on the recordset, store
the value of col2 in a temp variable, movenext again, so that Im back
to the original record, then set col2 = col1 + temp variable. This
kinda works but is messy.

I'd be able to do this in VB or something if the text box fields were
a control array or whatever.

Any help on this would be most appreciated.
Nov 13 '05 #1
1 2384
I didn't think it was possible, but I think I have cracked it.

Assiming the table is called Table1 and has a field ID which is an
autonumber, and a Numeric Field called Col1

Create a continuous form with ID & Col1 bound to the table. This must be
bound to a table or query where the ID is in ascending order.
Create a textbox called Col2
the Control Source of Col2 is =IIf(Not
IsNull([Col1]),DSum("Col1","Table1","ID <= " & [ID]))

You also have to save the record after updateing Col1 with and requery Col2

Private Sub Col1_AfterUpdate()

DoCmd.RunCommand acCmdSaveRecord
Col2.Requery

End Sub

and you have to requery Col2 after deleting a record from the form

Private Sub Form_AfterDelConfirm(Status As Integer)

Col2.Requery

End Sub

HTH

Phil

"D Boyd" <da*********@gmail.com> wrote in message
news:54**************************@posting.google.c om...
Im trying to get the name of a bound control on a continuous form in
Access. So that I can get the value of any text field.

This is what Im looking to do....

The user enters a value for number of entries for a specific month in
column1, column2 is the value for number of entries used Year to Date.
So I am looking to calculate column2 with the value of the current
column1 plus the value of the previous records column2.

Confused yet?

Example...

Col1 Col2
------------------------------------
5 5
2 7
3 10
5 15

so user enters.... 4 for next record in col1 hence col2 should be
calculated to 19. I attempted to code a work around which when the
user lost focus on col1 I went move previous on the recordset, store
the value of col2 in a temp variable, movenext again, so that Im back
to the original record, then set col2 = col1 + temp variable. This
kinda works but is messy.

I'd be able to do this in VB or something if the text box fields were
a control array or whatever.

Any help on this would be most appreciated.

Nov 13 '05 #2

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

Similar topics

1
by: Serious_Practitioner | last post by:
Hello, all - I want to get a customer name, address and so forth from a customer table using either a SELECT statement in a VBA procedure or in a query. The user should be able to put a customer...
2
by: Karl Roes | last post by:
Thanks Turtle, but ... what for ? Could you please explain a little more. I am wanting to know the status of all check boxes in a continuous form ie. all are 'ticked'. MacDermott wrote - ...
10
by: lorirobn | last post by:
Hi, I have a form with several combo boxes, continuous form format, with record source a query off an Item Table. The fields are Category, Subcategory, and Color. I am displaying descriptions,...
9
by: Edwinah63 | last post by:
Hi everyone, Please let there be someone out there who can help. I have two BOUND combo boxes on a continuous form, the second being dependent on the first. I have no problem getting the...
2
by: Pablo | last post by:
I have a Continuous Form based on the following table: sku, description, categoryId, subCategoryId I restrict the initial dataset to include one value for categoryId, but it may include...
6
by: bammo | last post by:
MS Access 2003, Windows XP SP2, VBA I have a continuous form that allows edits and filters, but not deletions or additions. I filter the form based on combining selections the user makes in...
9
by: RICHARD BROMBERG | last post by:
Please bear in mind that I am a newbie. I am posting this question a second time because the responses to my earlier post were a little wide of the mark. So, here goes: I am using Access 2000...
11
by: jwessner | last post by:
I have a form (Form1) which contains basic Project data and a subform listing the personnel assigned to the Project as a continuous form. Selecting a person on that project and clicking on a command...
7
by: scottbouley | last post by:
I am creating an Access report that replicates a preprinted grid form by using bordered text boxes. Each detail row on the preprinted form accomodates two lines. However,some of my records consist...
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
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...
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...
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...
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 ...

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.