• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 355
  • Last Modified:

reference label value on form in query grid function

I have this:
Sequence7: Right(OnlyAlphaNum([vin_original_dvla])7)

how do i make the seven point to the value of a label on the form?

i tried:
Sequence7: Right(OnlyAlphaNum([vin_original_dvla]), me.LblExportSeqCount.caption)
am in the query grid in access 2010
0
PeterBaileyUk
Asked:
PeterBaileyUk
  • 3
1 Solution
 
Dale FyeCommented:
Are you saying that the caption of the label has a numerical value that you want to use to determine how many characters to use?
0
 
Dale FyeCommented:
To refer to a control on a form, the syntax looks like:

Forms!formName.control

For a labels caption, you would also have to change that to a number, something like:

Val(Forms!formName.lblExportSeqcount.caption)
0
 
Dale FyeCommented:
I assume that the OnlyAlphaNum( ) function call will return a string value

So, in your query it might look like:
Sequence7: Right(OnlyAlphaNum([vin_original_dvla]), Val(Forms!yourFormName.LblExportSeqCount.caption)))

Open in new window

0
 
PeterBaileyUkAuthor Commented:
thank you fyed.
0

Featured Post

Learn to develop an Android App

Want to increase your earning potential in 2018? Pad your resume with app building experience. Learn how with this hands-on course.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now