How to find out information on form's current record (1 Viewer)

darkmastergyz

Registered User.
Local time
Yesterday, 16:00
Joined
May 7, 2006
Messages
85
My form's control data is currently linked to a query. I'm trying to use vba to get information about the fields in the current record.

I think it's supposed to be:

Forms!Form1. (something here?)

But I just can't seem to figure it. What code am I supposed to use? Thanks!
 

darkmastergyz

Registered User.
Local time
Yesterday, 16:00
Joined
May 7, 2006
Messages
85
Thanks for the link, but I still can't seem to get it to work. Here's what I'm doing:

Me.RecordSource![ID]

and it's not working...
 

pbaldy

Wino Moderator
Staff member
Local time
Yesterday, 16:00
Joined
Aug 30, 2003
Messages
36,133
I didn't notice that anywhere on the link. Try this:

Me.ID
 

darkmastergyz

Registered User.
Local time
Yesterday, 16:00
Joined
May 7, 2006
Messages
85
Oh ok that works on one field. But, in another field, in the query, I have a dot in the name of the field, eg. it's data.Pri What should I do in that case? Thanks!
 
Last edited:

pbaldy

Wino Moderator
Staff member
Local time
Yesterday, 16:00
Joined
Aug 30, 2003
Messages
36,133
If you have a dot in the field name (inadvisable), you'd have to bracket the name.

[data.Pri]
 

Users who are viewing this thread

Top Bottom