Solved

reference label value on form in query grid function

Posted on 2013-01-25
4
350 Views
Last Modified: 2013-01-25
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
Comment
Question by:PeterBaileyUk
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 48

Expert Comment

by:Dale Fye
ID: 38819589
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
 
LVL 48

Expert Comment

by:Dale Fye
ID: 38819603
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
 
LVL 48

Accepted Solution

by:
Dale Fye earned 500 total points
ID: 38820356
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
 

Author Closing Comment

by:PeterBaileyUk
ID: 38821471
thank you fyed.
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question