Grid Pane Field Expressions

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Ordinarily, I would put field expression code in the
OnFormat_Detail event section. However, if it's possible
to build the expression I want directly into a query
grid pane while in grid design, I would prefer to do
that in the current instance.

Current case: I have a field "Title" (happens to be
the title of a classical music piece.) and I also have
the cataloging system and values in separate fields,
CatSystem and CatSystemVal, e.g., "Op.", "78".
So, if the current piece has a chronological catalog
value, I want the query to return it appended to the
title of the piece.

Example:
Title = Symphony
CatSystem = Op.
CatSystemVal = 74

resulting expression from query: Symphony No. 6, Op.74

In VBA OnFormat_Detail, I would code something like
Dim strTitle as string

strTitleExp = Me.Title 'Where strTitleExp is what is to be displayed.
if len(CatSystemVal & "") > 0 then strTitleExp = strTitleExp & ", " &
CatSystem & CatSystemVal

Thanks,
Bill



.



Relevant Pages

  • Re: Grid Pane Field Expressions
    ... You can use a calculated expression in the query grid. ... You can also enter this expression directly into a textbox ... CatSystem & CatSystemVal ...
    (microsoft.public.access.queries)
  • Re: update query: still having problems
    ... bring the workstatus field in the grid and, at the criteria line, write: ... UPDATE Department INNER JOIN Sheet1 ON Department.employeeID = ... What I want to do is press a button that will run the query and update the ...
    (microsoft.public.access.queries)
  • Re: Sequence numbering labels
    ... The upper pane of the query design window contains the tables. ... lower pane is the output grid. ... table field to the query output grid' ...that I did not understand, ... and put that count field into the label via label wizard. ...
    (microsoft.public.access.modulesdaovba)
  • Re: VB.NET - How do I return an AutoNumber from an Insert Statement using the DataGridView
    ... > Thanks for that Bart, ... > the values from my Grid to the TableAdapters Insert method. ... >> choose add query, then choose insert query, use a query like below, ... >>> stored in the SQL Database but a VB generated (or disconected dataset ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Using queries in a table adaptor?
    ... using the query wizard I have added several queries ... FROM [Drive Package] ... Not there is no Join here these are just simple Queries on a simple table. ... I am use the flex grid because of some unique features ...
    (microsoft.public.dotnet.framework.adonet)