Solved

reference label value on form in query grid function

Posted on 2013-01-25
4
342 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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Join & Write a Comment

QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
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…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

707 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now