By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,847 Members | 2,285 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,847 IT Pros & Developers. It's quick & easy.

Using the value from a cell in a continuous form

P: 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
Share this Question
Share on Google+
5 Replies


RuralGuy
Expert 100+
P: 375
That "column" is displayed in a control that has a name that you can reference.
Oct 21 '08 #2

missinglinq
Expert 2.5K+
P: 3,532
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

P: 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
Expert 2.5K+
P: 3,532
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

P: 60
Thank you Linq! Problem solved. I appreciate all your help!

Ramprat
Oct 23 '08 #6

Post your reply

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