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

Using the value from a cell in a continuous form

60
Hi,

Using Access 2003 how do you read the value from a particular cell (row/column combination) in the current record of a continuous form and use this value elsewhere? For example, how do you capture what is in column 2 of the current record of a continuous form? This sounds like it should be simple but maybe I am.

Thanks
Oct 21 '08 #1
5 7555
RuralGuy
375 Expert 256MB
That "column" is displayed in a control that has a name that you can reference.
Oct 21 '08 #2
missinglinq
3,532 Expert 2GB
You really need to get out of you "Excel" state of m ind. In Access the "columns" are, as Allan has said, textbox controls that hold fields, each of which has its own name. The "rows" represent records.

If the name of the 2nd column was, for instance, LastName, then to refer to this control, on the Current Record, in code in that form you'd use

Me.LastName.Value

Because .Value is the Default Property for a Textbox control, you can shorten referral to it to simply

Me.LastName

Exactly how/where are you trying to use the value?

Linq ;0)>
Oct 21 '08 #3
ramprat
60
You really need to get out of you "Excel" state of m ind. In Access the "columns" are, as Allan has said, textbox controls that hold fields, each of which has its own name. The "rows" represent records.

If the name of the 2nd column was, for instance, LastName, then to refer to this control, on the Current Record, in code in that form you'd use

Me.LastName.Value

Because .Value is the Default Property for a Textbox control, you can shorten referral to it to simply

Me.LastName

Exactly how/where are you trying to use the value?

Linq ;0)>
Linq,

Thanks. What I am trying to do is to update a timestamp field (a field in the underlying table of my continous form) with the current date when a record is changed on my continuous form. I only want to update the timestamp field for that particular record that is changed and not for all the records in the table whcih is what seems to ahppen when I work with continuous forms.

Thanks
Oct 22 '08 #4
missinglinq
3,532 Expert 2GB
That's simple enough to do, something like:

For Date & Time
Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_BeforeUpdate(Cancel As Integer)
  2.   Me.TimeStampFieldName = Now
  3. End Sub
For just Date
Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_BeforeUpdate(Cancel As Integer)
  2.  Me.TimeStampFieldName = Date
  3. End Sub
When you say your current efforts are changing the timestamp for all records, do you mean it does this in the table, or that the field shows the same timestamp for all records on the continuous form? When changing data in one textbox on a continuous/datasheet form changes the data in that textbox on all records, it indicates that the textbox is not actually bound to a field in the underlying table/query.

Linq
Oct 22 '08 #5
ramprat
60
Thank you Linq! Problem solved. I appreciate all your help!

Ramprat
Oct 23 '08 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Giulio | last post by:
Hello, I have a continuous form with a combo box inside. From the combo box I can pick some values which, by the "after-update" event, change some other combo box values determined by a query....
5
by: Deborah V. Gardner | last post by:
I would like to use "Yes" and "No" checkboxes on a subform. The problem is that when I click the Yes checkbox on the subform, all of the checkboxes are checked. Currently, I have a field...
19
by: James Fortune | last post by:
I have a lot of respect for David Fenton and Allen Browne, but I don't understand why people who know how to write code to completely replace a front end do not write something that will automate...
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. ...
2
by: ThompsonJessical | last post by:
I am trying to use a button with the vba coding for SendObject Function to email a specific report based on the value of another field of the current record. The form is a continuous form and...
4
by: | last post by:
Hi All I have a question about re-using a drop downlist box across several questions on a questionaire like form. I will include code after some explaination. I thought i could make a...
2
by: Ch Pravin | last post by:
Hi All: I am having the following xml which i need to convert to excel using xslt. Please help me out. Afghanistan.xml <?xml version="1.0" encoding="utf-16"?> <Languages...
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...
1
by: gbengston | last post by:
Please look at my example, I have a script that pulls the value of one cell and inserts it into an input box in another cell. My problem is that the source cell is itself an input box so when I pull...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: 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
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...

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.