Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pass record id from continuous form 2

Status
Not open for further replies.

lachesis

Technical User
Sep 25, 2002
138
NZ
I have a continuous form (actually a sub form, but you get the idea). On each record row I want to put an Edit button that kicks the user to another form.

What I want to do is pass the record ID of the row whose Edit button is clicked. Is there an easy way to tie the each Edit button to its corresponding record, so the record ID lookup process is transparent??

I'm kinda stuck for ideas with this one. I could end up with hundreds, if not thousands of records, so writing code for each Edit button is not feasible.

thanks
L.
 
You can pass the Record ID of a record by storing it in a Global variable in the OnCurrent event procedure of the subform.

Data Base module:

Global vRecID as Long

On Current event Procedure:
vRecID = Me![RecordID]

Now as you click on your Edit button and open the editing form the Global variable record value is available for you to open the form to that particular record.

Post back if you have any questions.

Bob Scriver
Want the best answers? See FAQ181-2886
Nobody believes the official spokesman... but everybody trusts an unidentified source.
Author, Bagdad Bob???

 
[tt]
Hi:

I'm following this thread because I want to accomplish the same thing. I've been looking at the "OpenArgs" property, and found this on MS' database:


One more bit of info...

But I like Bob's suggestion. Sounds easier than procedures I've thought of.

Good luck,[/tt]

[glasses][tt]Gus Brunston - Access2000(DAO)
Skill level based on 1-10: 7, on the way to 6, and beyond!
Webmaster: www.rentdex.com[/tt]
 
Glad to be of help. Thanks for the star!!

Bob Scriver
Want the best answers? See FAQ181-2886
Nobody believes the official spokesman... but everybody trusts an unidentified source.
Author, Bagdad Bob???

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top