Value in a form field

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,
I have this code and for some reason I can't get the value of the field.
What am I doing wrong?

[Forms]![frmListReleaseTrack]![ListRelease Track tbl sbfrm]![TrackNoValid]

Thanks in advance!

Anna
 
Anna said:
Hi,
I have this code and for some reason I can't get the value of the
field. What am I doing wrong?

[Forms]![frmListReleaseTrack]![ListRelease Track tbl
sbfrm]![TrackNoValid]

Thanks in advance!

Anna

In your current syntax the third piece is referring to the subform "control" and
you need to reference the form being displayed within that.

[Forms]![frmListReleaseTrack]![ListRelease Track tbl sbfrm].Form![TrackNoValid]
 
I'm still not getting anything.. I even put a msgbox for that and nothing... :(

Rick Brandt said:
Anna said:
Hi,
I have this code and for some reason I can't get the value of the
field. What am I doing wrong?

[Forms]![frmListReleaseTrack]![ListRelease Track tbl
sbfrm]![TrackNoValid]

Thanks in advance!

Anna

In your current syntax the third piece is referring to the subform "control" and
you need to reference the form being displayed within that.

[Forms]![frmListReleaseTrack]![ListRelease Track tbl sbfrm].Form![TrackNoValid]
 
Anna said:
I'm still not getting anything.. I even put a msgbox for that and
nothing... :(

Just nothing or do you get an error? Try this. With your form open open a
new query. In a balnk column definition right click and choose "Build...".
When the expression builder opens you can navigate to the control in
question by going through...

Forms
Open Forms
Main Form
SubForm
ControlName

That way you are guaranteed to get back a correct reference to the control.
Then you can copy and paste that where you need it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top