I have a query that will create a report. The SQL statements that comprise this query are a series of 5 Union statements broken out by date ranges. The last part of each of the SQL statements in each of the Unions are as follows:
The first union is for a date range within the last 6 months...
I created 5 SELECT UNION statements as follows. I created 1 aggregate record per Customer Number to get their total MarketValue/Cash value (the sum of 2 separate fields). The reason I used a Union was because ultimately I will be creating an Aging report that breaks down into different time...
I ran the following query and got the result set which I will split into 2 sections below:
SELECT C.CustomerNumber, C.DateLost, IIf(Sum(Nz(P.MarketValue,0)+Nz(P.CashBalance,0))<1000,"L1") AS CAT1, IIf(Sum(Nz(P.MarketValue,0)+Nz(P.CashBalance,0)) Between 1000 And 9999.99,"L2") AS CAT2...
I run the following query named Query5 and get the results that follow:
SELECT C.CustomerNumber, C.DateLost, Sum(Nz(P.MarketValue,0)+Nz(P.CashBalance,0)) AS TOTAL, "LT6" AS AGE
FROM tblCustomers AS C INNER JOIN tblProducts AS P ON C.CustomerNumber = P.CustomerNumber
WHERE (((C.DateLost) Between...
I executed the following query:
SELECT tblCustomers.CustomerNumber, tblCustomers.DateLost, , tblProducts.MarketValue, tblProducts.CashBalance
FROM tblCustomers INNER JOIN tblProducts ON tblCustomers.CustomerNumber = tblProducts.CustomerNumber
GROUP BY tblCustomers.CustomerNumber...
My goal is to create the following 2 Aging report formats:
Report As of 2/16/2005
(Date range is 8/1/2004 to 1/31/05)
Less Than 6 Months Old # of Accounts ACCT VALUE
------------------------- ------------- ----------
100K and Above
50 K up to less than 100K
under...
I have 2 listboxes on a form from which the user can make a selection of state codes. I have set up 2 radio buttons adjacent to the listboxes to allow the user to toggle between these 2 listboxes. One of the listboxes sits on top of the other (superimposed) because I wanted to have the listbox...
I just added a Microsoft StatusBar Control (ActiveX Control version 6.0 (class MSComctlLib.SBarCtrl.2) to the bottom of 1 of my forms.
How would I go about getting traffic light picture icons and paint the status bar red, yellow or green. I wanted to make the status bar green for informational...
Suppose you want to provide a user with a list box in which the choices are the current year, up to 10 prior years and up to 10 future years.
In other words, the choices in the list box should be 2015, 2014, 2013, 2012, 2011, 2010, 2009, 2008, 2007, 2006, 2005, 2004, 2003, 2002, 2001, 1999...
I execute the following sub procedure to generate a report in Excel based on a query I created via the Objects list Query using QBE.
Is there a way to run a similar function to take a string I created which I will call strDynamicSQL. This string contains a SQL statement based on listbox values...
I am trying to write Dynamic SQL chunks of code in a form class module.
I have a listbox representing YEARS, which is populated with the following values (established by the user, not me).
Listbox Value for YEARS:
-----------------------------------
ALL - value needs to be translated into...
I was trying to attach code to the On Click event of a Command Button of a Form. When the Command Button is clicked, I wanted to write Dynamic SQL so that I could execute a query based on the values that the user entered into list boxes on the form.
The VBA code I started to write is as...
I am working with 3 tables as follows:
1)Customer 2)Products 3)States
Each customer can have multiple products.
Each customer record has a Date Lost field representing the date that the customer last laid claim to the products that he or she owns. These products are deemed Abandoned Property...
I have a list box for States of the U.S. and 2 associated option buttons.
The option buttons were meant to toggle the Multiselect property of the listbox between Multiselect None or Simple.
One option button which I made the default is labeled as Group By (the choices are ALL, Group A states...
I created the following in the qbe grid for a criteria and it works fine. How would I modify the 3rd parameter so that
Cdate returns 12/31/2004 instead of it's present return value of 12/31/2005.
for ex: assume the field Stocks = 3 in the following function...
In the QBE grid, I defined the following field:
Field: Check/Cert:Format(nz([SharesAmt],[CashBal],'#.000')
In the criteria for this field I defined the following:
> tblState.Aggreg
The idea was place into the Check/Cert field, the contents of either the field SharesAmt or CashBal. Either the...
I was thinking of creating a Status Bar at the base of a form. Would a status bar have to be created at the time a form is created or can it be added on after the form has already been created ?
Could you tell me how to create a Status Bar ? My intent is to use the Status Bar to send messages...
I have 2 fields that I want to concatenate (and remove the high order position of 1 of these fields) and display them as 1 composite field with a different field name on a report.
For example: I have a field named OfficeNumber and a field named CustomerNumber.
Office Number has a value of...
I wanted to create a state form that would allow the user to edit the records (add, change, delete functionality) of 1 table.
This State table has 50 rows for the 50 states. It has fields for the State code, a field with a dollar amount and 3 fields that would have integer values. An example...
I created a query in Access using the QBE grid. Then I wanted to pass a string containing the SQL code into a Recordset. Therefore, I ran the query, went into SQL view and cut and paste the generated SQL code into a string variable named strFSSQL. The SQL code was a lengthly statement so I split...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.