Solved

reference label value on form in query grid function

Posted on 2013-01-25
4
344 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
  • 3
4 Comments
 
LVL 47

Expert Comment

by:Dale Fye (Access MVP)
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 47

Expert Comment

by:Dale Fye (Access MVP)
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 47

Accepted Solution

by:
Dale Fye (Access MVP) 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

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

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

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…

809 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