A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Getting to the right ID on a continuous form



 
 
Thread Tools Display Modes
  #1  
Old January 25th, 2010, 06:15 PM posted to microsoft.public.access.forms
Kevin C Niven
external usenet poster
 
Posts: 29
Default Getting to the right ID on a continuous form

On a continuous subform, I have a button that opens up a simple form
that allows the user to enter a note for a particular record.

a field1 field2 [btn]
b field1 field2 [btn]
c field1 field2 [btn]
  #2  
Old January 25th, 2010, 07:17 PM posted to microsoft.public.access.forms
Al Campagna[_2_]
external usenet poster
 
Posts: 1,462
Default Getting to the right ID on a continuous form

Kevin,
More information about this table, and how it might relate
to others in your app... would be useful but...
And, a separate button to go to each of multiple records is
unworkable.
And, you didn't mention how you know which (of multiple records)
you want to go to.

Some basics...
You create the ID field in your table design.
A common method, is an Autonumber field, to give each
record a unique key value.
In your table example... you could have created an autonumber
field called TransID... each record would have it's TransID value
assigned by Access at record creation.
TransID Field1 Field2
1 X Y
2 G Q
3 B T
4 X T etc....

This TransID has nothing to do with any other field in your table that
may be used to link to other tables. This is just to give each record
a unique key identifying value.
Now, you can go to any record with just one button.
Do the OpenForm method, and specify the particular TransID
you're looking for... in the Where argument of the OpenForm.

DoCmd.OpenForm "X",,, "TransID = " & Me.TransID
--
hth
Al Campagna
Microsoft Access MVP 2006-2009
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."



"Kevin C Niven" wrote in message
...
On a continuous subform, I have a button that opens up a simple form
that allows the user to enter a note for a particular record.

a field1 field2 [btn]
b field1 field2 [btn]
c field1 field2 [btn]
.
.
.

The problem is that if the user clicks, say, the button on the third
record down (c), that opens the note for the first record in the
continuous form (a). No matter which record's button the user clicks
on the continuous form, it always opens to the first record's note.

What I need to do, I guess, is get the ID of the record that the user
is clicking the button in and use DoCmd.OpenForm to open that
particular record's context note.

Is that correct? And how do I get the ID of the current record in a
continuous form?


Thanks,
Kevin



  #3  
Old January 25th, 2010, 09:42 PM posted to microsoft.public.access.forms
Jerrel Jones
external usenet poster
 
Posts: 1
Default Getting to the right ID on a continuous form

I dont know what this is about, but im sure it interesting.
"Al Campagna" wrote in message
...
Kevin,
More information about this table, and how it might relate
to others in your app... would be useful but...
And, a separate button to go to each of multiple records is
unworkable.
And, you didn't mention how you know which (of multiple records)
you want to go to.

Some basics...
You create the ID field in your table design.
A common method, is an Autonumber field, to give each
record a unique key value.
In your table example... you could have created an autonumber
field called TransID... each record would have it's TransID value
assigned by Access at record creation.
TransID Field1 Field2
1 X Y
2 G Q
3 B T
4 X T etc....

This TransID has nothing to do with any other field in your table that
may be used to link to other tables. This is just to give each record
a unique key identifying value.
Now, you can go to any record with just one button.
Do the OpenForm method, and specify the particular TransID
you're looking for... in the Where argument of the OpenForm.

DoCmd.OpenForm "X",,, "TransID = " & Me.TransID
--
hth
Al Campagna
Microsoft Access MVP 2006-2009
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."



"Kevin C Niven" wrote in message
...
On a continuous subform, I have a button that opens up a simple form
that allows the user to enter a note for a particular record.

a field1 field2 [btn]
b field1 field2 [btn]
c field1 field2 [btn]
.
.
.

The problem is that if the user clicks, say, the button on the third
record down (c), that opens the note for the first record in the
continuous form (a). No matter which record's button the user clicks
on the continuous form, it always opens to the first record's note.

What I need to do, I guess, is get the ID of the record that the user
is clicking the button in and use DoCmd.OpenForm to open that
particular record's context note.

Is that correct? And how do I get the ID of the current record in a
continuous form?


Thanks,
Kevin




 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 06:56 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.