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

Finding Currentrecord in Subform

P: 5
Hi, I'm new to thescripts.com. I'm also new to MS Access and I have been struggling with what seems to be an easy task. I have a subform that displays query results. I am wanting to be able to get the Currentrecord of the subform that is selected. For some reason, it is returning "1" everytime when I do a me.currentrecord. I think it may be retrieving this from the mainform?
I'm pretty frustrated and any help would be great!
May 9 '07 #1
Share this Question
Share on Google+
3 Replies


Rabbit
Expert Mod 10K+
P: 12,364
To refer to a property on a subform use, Me.SubformControl.Form.PropertyName.
May 9 '07 #2

JConsulting
Expert 100+
P: 603
Hi, I'm new to thescripts.com. I'm also new to MS Access and I have been struggling with what seems to be an easy task. I have a subform that displays query results. I am wanting to be able to get the Currentrecord of the subform that is selected. For some reason, it is returning "1" everytime when I do a me.currentrecord. I think it may be retrieving this from the mainform?
I'm pretty frustrated and any help would be great!
Hi Tony,
I think the problem is one of focus. if you're trying to run code from the main form, then as soon as you leave the subform, it no longer has a current record.

Can you explain a little better what you're trying to do and from what event, and what form?
J
May 10 '07 #3

P: 5
Thanks guys! You just took away a big headache! I was looking for a way to access the properties in the subform. And the ".Form" did the trick. I don't know why they didn't make it more apparant in the help. I was about to start from square one and rethink my entire database. Thanks again.
May 10 '07 #4

Post your reply

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