Hi,
I am trying to automate the running of a SQL Query. I have a Table in Access 2003 that contains records with several fields, (member identifier, $ amount and months during the year they were members). I want to create a "histogram" of sorts to count and sum the information depending on which bucket the $ amount falls in. For example all members with $ amount between 0 and $1, all members between $1 and $100, etc. The two Queries I have written do this in steps, and currently prompts me to enter the Min and Max values. The first query is a Select Query that creates a Table of all records that fall betwqeen the Min and Max. The second Query then collapses the data to Sum the $ amount and count the members. I then copy the result into an Excel spreadsheet.
How can I automate this process so that I can have the Queries run automatically using as an input an array of Min and Max pairs? I'd also like the output of each run to be automatically (and successively) stored in an Excel Worksheet.
Here are the SQL Queries I have written:
The first is called CLT and creates a Table used by the second -
SELECT [15B].[Member ID], [15B].[Total], [15B].[Member Months], [min $ ?] AS [MIN], [max $ ?] AS [MAX]
-
FROM 15B
-
WHERE ((([15B].[Total])>=[min $ ?] And ([15B].[Total])<[max $ ?]));
-
and the second query: -
SELECT [CLT].MIN, [CLT].MAX, Count(NZ([CLT].[Member ID])) AS [CountOfMember ID], Sum([CLT].[Total]) AS [SumOfTotal]
-
FROM CLT
-
GROUP BY [CLT].MIN, [CLT].MAX;
-
I have been trying to use VBA scripts, but have not been successful. Any advice would be appreciated,
Wil
18 3727
Hi,
I am trying to automate the running of a SQL Query. I have a Table in Access 2003 that contains records with several fields, (member identifier, $ amount and months during the year they were members). I want to create a "histogram" of sorts to count and sum the information depending on which bucket the $ amount falls in. For example all members with $ amount between 0 and $1, all members between $1 and $100, etc. The two Queries I have written do this in steps, and currently prompts me to enter the Min and Max values. The first query is a Select Query that creates a Table of all records that fall betwqeen the Min and Max. The second Query then collapses the data to Sum the $ amount and count the members. I then copy the result into an Excel spreadsheet.
How can I automate this process so that I can have the Queries run automatically using as an input an array of Min and Max pairs? I'd also like the output of each run to be automatically (and successively) stored in an Excel Worksheet.
Here are the SQL Queries I have written:
The first is called CLT and creates a Table used by the second -
SELECT [15B].[Member ID], [15B].[Total], [15B].[Member Months], [min $ ?] AS [MIN], [max $ ?] AS [MAX]
-
FROM 15B
-
WHERE ((([15B].[Total])>=[min $ ?] And ([15B].[Total])<[max $ ?]));
-
and the second query: -
SELECT [CLT].MIN, [CLT].MAX, Count(NZ([CLT].[Member ID])) AS [CountOfMember ID], Sum([CLT].[Total]) AS [SumOfTotal]
-
FROM CLT
-
GROUP BY [CLT].MIN, [CLT].MAX;
-
I have been trying to use VBA scripts, but have not been successful. Any advice would be appreciated,
Wil
What are the VBA scripts you have tried to use? Can you post the code?
I guess I should have said "I'd like to use VBA scripts", because they seem like they could handle the approach. I don't have any VBA scripts - only the SQL queries shown above.
Thanks,
Wil
How are these min/max pairs coming about? Are they chosen by the user or are they constant?
They are constant. Right now when I run the Select query I enter them by hand. However, I have them stored in a Table and would like to automate the process. Here is the table:
Min Max
($20,000,000.00) ($0.01)
$0.00 $1.00
$1.00 $250.00
$250.00 $1,000.00
$1,000.00 $2,500.00
$2,500.00 $5,000.00
$5,000.00 $10,000.00
$10,000.00 $15,000.00
$15,000.00 $20,000.00
$20,000.00 $25,000.00
$25,000.00 $30,000.00
$30,000.00 $35,000.00
$35,000.00 $40,000.00
$40,000.00 $45,000.00
$45,000.00 $50,000.00
$50,000.00 $55,000.00
$55,000.00 $60,000.00
$60,000.00 $65,000.00
$65,000.00 $70,000.00
$70,000.00 $75,000.00
$75,000.00 $80,000.00
$80,000.00 $85,000.00
$85,000.00 $90,000.00
$90,000.00 $95,000.00
$95,000.00 $100,000.00
$100,000.00 $150,000.00
$150,000.00 $200,000.00
$200,000.00 $250,000.00
$250,000.00 $300,000.00
$300,000.00 $350,000.00
$350,000.00 $400,000.00
$400,000.00 $450,000.00
$450,000.00 $500,000.00
$500,000.00 $750,000.00
$750,000.00 $1,000,000.00
$1,000,000.00 $2,000,000.00
$2,000,000.00 $200,000,000.00
Thanks,
Wil
Hi,
I am trying to automate the running of a SQL Query. I have a Table in Access 2003 that contains records with several fields, (member identifier, $ amount and months during the year they were members). I want to create a "histogram" of sorts to count and sum the information depending on which bucket the $ amount falls in. For example all members with $ amount between 0 and $1, all members between $1 and $100, etc. The two Queries I have written do this in steps, and currently prompts me to enter the Min and Max values. The first query is a Select Query that creates a Table of all records that fall betwqeen the Min and Max. The second Query then collapses the data to Sum the $ amount and count the members. I then copy the result into an Excel spreadsheet.
How can I automate this process so that I can have the Queries run automatically using as an input an array of Min and Max pairs? I'd also like the output of each run to be automatically (and successively) stored in an Excel Worksheet.
Here are the SQL Queries I have written:
The first is called CLT and creates a Table used by the second -
SELECT [15B].[Member ID], [15B].[Total], [15B].[Member Months], [min $ ?] AS [MIN], [max $ ?] AS [MAX]
-
FROM 15B
-
WHERE ((([15B].[Total])>=[min $ ?] And ([15B].[Total])<[max $ ?]));
-
and the second query: -
SELECT [CLT].MIN, [CLT].MAX, Count(NZ([CLT].[Member ID])) AS [CountOfMember ID], Sum([CLT].[Total]) AS [SumOfTotal]
-
FROM CLT
-
GROUP BY [CLT].MIN, [CLT].MAX;
-
I have been trying to use VBA scripts, but have not been successful. Any advice would be appreciated,
Wil
Here is a basic Code Template that you can adapt to your own specific needs in
order to automate your 'Query Creation Process', It assumes the following: __1. tblMinMax [Min] (CURRENCY) [Max] (CURRENCY) __2. tblMemberData [Member ID] (AUTO - PK) [Total] (CURRENCY) [Member Months] (TEXT) - Dim MyDB As DAO.Database, rsMinMax As DAO.Recordset
-
Dim strSQL As String, rsResult As DAO.Recordset
-
-
Set MyDB = CurrentDb()
-
-
'rsMinMax will consist of all Min/Max pairs in tblMinMax
-
Set rsMinMax = MyDB.OpenRecordset("tblMinMax", dbOpenSnapshot)
-
-
rsMinMax.MoveFirst
-
-
Do While Not rsMinMax.EOF
-
strSQL = "SELECT * FROM tblMemberData WHERE [Total] Between " & rsMinMax![Min] & " And " & rsMinMax![Max] & ";"
-
Set rsResult = MyDB.OpenRecordset(strSQL, dbOpenSnapshot)
-
rsResult.MoveFirst
-
'processing goes here for each Min/Max pair
-
rsMinMax.MoveNext
-
Loop
-
-
rsMinMax.Close
-
rsResult.Close
Hi ADezii,
Thanks for the code snippet. I have added it it to a function, and am still having trouble with the second part of my processing. I have modified your snippet to run the first query(with the fields I am interested in), but I still need to run a second Query to Sum and Count. Can I operate on rsResult as if it were a Table? Please look at the following code to see what I have attempted: -
Function GenContTbl(tblMinMax, MemberTbl, File_Name) As Integer
-
'?GenContTbl("CTRanges", "15A", "C:\crap\test2.txt")
-
Dim MyDB As DAO.Database, rsMinMax As DAO.Recordset
-
Dim strSQL As String, strSQL2 As String, rsResult As DAO.Recordset, rsResult2 As DAO.Recordset
-
Dim line
-
-
Set MyDB = CurrentDb()
-
-
'rsMinMax will consist of all Min/Max pairs in tblMinMax
-
Set rsMinMax = MyDB.OpenRecordset(tblMinMax, dbOpenSnapshot)
-
-
rsMinMax.MoveFirst
-
-
Do While Not rsMinMax.EOF
-
'strSQL = "SELECT * FROM 15A WHERE [Total Allowed Claims] Between " & rsMinMax![Min] & " And " & rsMinMax![Max] & ";"
-
strSQL = "SELECT [Member ID], [Total Allowed Claims], [Member Months] FROM 15A WHERE [Total Allowed Claims] Between " & rsMinMax![Min] & " And " & rsMinMax![Max] & ";"
-
Set rsResult = MyDB.OpenRecordset(strSQL, dbOpenSnapshot)
-
rsResult.MoveFirst
-
-
'strSQL2 = "SELECT [CLT].MIN, [CLT].MAX, Count(NZ([CLT].[Member ID])) AS [CountOfMember ID], Sum([CLT].[Total Allowed Claims]) AS [SumOfTotal Allowed Claims]" FROM CLT GROUP BY [CLT].MIN, [CLT].MAX;
-
strSQL2 = "SELECT Count(NZ([Member ID])) AS [CountOfMember ID]FROM rsResult;"
-
Set rsResult2 = MyDB.OpenRecordset(strSQL2, dbOpenSnapshot)
-
-
'processing goes here for each Min/Max pair
-
-
rsMinMax.MoveNext
-
Loop
-
-
rsMinMax.Close
-
rsResult.Close
-
-
End Function
-
Is it possible to examine rsResult and rsReult2 in the debugger as I step through the code?
Secondly, I would like to somehow store the result of the second query - preferebly as a record in a new table, which I would then output to excel.
Lastly, I am running into an error situation when the first query finds zero records. Is there an easy way around that?
Thanks much,
Wil
Hi ADezii,
Thanks for the code snippet. I have added it it to a function, and am still having trouble with the second part of my processing. I have modified your snippet to run the first query(with the fields I am interested in), but I still need to run a second Query to Sum and Count. Can I operate on rsResult as if it were a Table? Please look at the following code to see what I have attempted: -
Function GenContTbl(tblMinMax, MemberTbl, File_Name) As Integer
-
'?GenContTbl("CTRanges", "15A", "C:\crap\test2.txt")
-
Dim MyDB As DAO.Database, rsMinMax As DAO.Recordset
-
Dim strSQL As String, strSQL2 As String, rsResult As DAO.Recordset, rsResult2 As DAO.Recordset
-
Dim line
-
-
Set MyDB = CurrentDb()
-
-
'rsMinMax will consist of all Min/Max pairs in tblMinMax
-
Set rsMinMax = MyDB.OpenRecordset(tblMinMax, dbOpenSnapshot)
-
-
rsMinMax.MoveFirst
-
-
Do While Not rsMinMax.EOF
-
'strSQL = "SELECT * FROM 15A WHERE [Total Allowed Claims] Between " & rsMinMax![Min] & " And " & rsMinMax![Max] & ";"
-
strSQL = "SELECT [Member ID], [Total Allowed Claims], [Member Months] FROM 15A WHERE [Total Allowed Claims] Between " & rsMinMax![Min] & " And " & rsMinMax![Max] & ";"
-
Set rsResult = MyDB.OpenRecordset(strSQL, dbOpenSnapshot)
-
rsResult.MoveFirst
-
-
'strSQL2 = "SELECT [CLT].MIN, [CLT].MAX, Count(NZ([CLT].[Member ID])) AS [CountOfMember ID], Sum([CLT].[Total Allowed Claims]) AS [SumOfTotal Allowed Claims]" FROM CLT GROUP BY [CLT].MIN, [CLT].MAX;
-
strSQL2 = "SELECT Count(NZ([Member ID])) AS [CountOfMember ID]FROM rsResult;"
-
Set rsResult2 = MyDB.OpenRecordset(strSQL2, dbOpenSnapshot)
-
-
'processing goes here for each Min/Max pair
-
-
rsMinMax.MoveNext
-
Loop
-
-
rsMinMax.Close
-
rsResult.Close
-
-
End Function
-
Is it possible to examine rsResult and rsReult2 in the debugger as I step through the code?
Secondly, I would like to somehow store the result of the second query - preferebly as a record in a new table, which I would then output to excel.
Lastly, I am running into an error situation when the first query finds zero records. Is there an easy way around that?
Thanks much,
Wil
'Insert this line for the Summation of [Total] for a given Min/Max combination as indicated in the code below (code window):
Debug.Print DSum("[Total]", "tblMemberData", "[Total] Between " & rsMinMax![Min] & " And " & rsMinMax![Max]) - Dim MyDB As DAO.Database, rsMinMax As DAO.Recordset
-
Dim strSQL As String, rsResult As DAO.Recordset
-
-
Set MyDB = CurrentDb()
-
-
'rsMinMax will consist of all Min/Max pairs in tblMinMax
-
Set rsMinMax = MyDB.OpenRecordset("tblMinMax", dbOpenSnapshot)
-
-
rsMinMax.MoveFirst
-
-
Do While Not rsMinMax.EOF
-
strSQL = "SELECT * FROM tblMemberData WHERE [Total] Between " & rsMinMax![Min] & " And " & rsMinMax![Max] & ";"
-
Set rsResult = MyDB.OpenRecordset(strSQL, dbOpenSnapshot)
-
rsResult.MoveFirst
-
'----------------------------- Insertion Here -----------------------------
-
Debug.Print DSum("[Total]", "tblMemberData", "[Total] Between " & rsMinMax![Min] & " And " & rsMinMax![Max])
-
-
'processing goes here for each Min/Max pair
-
rsMinMax.MoveNext
-
Loop
-
-
rsMinMax.Close
-
rsResult.Close
Thanks for the Debug statement. It is very helpful.
Is there a way to run my second query on the resultant "rsResult"?
Thanks in advance,
Wil
Thanks for the Debug statement. It is very helpful.
Is there a way to run my second query on the resultant "rsResult"?
Thanks in advance,
Wil
You seem to be unlucky in that you caught the least skilled Moderator/Expert as far as SQL goes. From what I see, you cannot Open the Query from the Recordset (rsResult) itself but you can utilize the SQL String used to create the Rercordset, namely strSQL. You cannot use the RunSQL or Execute Methods since they are reserved for Action Queries. What you can do, and this is a far stretch, is create a QueryDef (Query) Object based on the SQL and then Open the Query. The code below will illustrate the point I am making. -
Dim qdf As QueryDef, qdf2 As QueryDef
-
'If the Query Exists, it must be Deleted or an Error will occur
-
For Each qdf2 In CurrentDb.QueryDefs
-
If qdf2.Name = "MyQuery" Then
-
CurrentDb.QueryDefs.Delete qdf2.Name
-
End If
-
Next
-
-
'Create the QueryDef, in your case from strSQL
-
Set qdf = CurrentDb.CreateQueryDef("MyQuery", "SELECT * FROM Employees WHERE [LastName] Like 'Bu*'")
-
-
'Open the Query
-
DoCmd.OpenQuery "MyQuery", acViewNormal, acReadOnly
NOTE: Please do not go crazy trying to implement this logic. As previously stated, I can almost guarantee that more skilled members will come up with a more viable solution, but for now it is an alternative.
I'm not sure what you are trying to do with your second query but if all you want is a count of the records returned then -
Dim countRes As Integer
-
-
rsResult.MoveLast
-
rsResult.MoveFirst
-
countRes = rsResult.RecordCount
-
Mary
I'm not sure what you are trying to do with your second query but if all you want is a count of the records returned then -
Dim countRes As Integer
-
-
rsResult.MoveLast
-
rsResult.MoveFirst
-
countRes = rsResult.RecordCount
-
Mary
Hello Mary:
I think what is requested here is a Summation of all values within the given Min/Max Range.
Hello Mary:
I think what is requested here is a Summation of all values within the given Min/Max Range.
The first query returns a set of records between the min and max range, right?
So if not a count of all records are we looking at the sum of the values within this range?
If so then ... -
Dim amt As Currancy ' don't know what your value is so this is a guess
-
-
amt = 0
-
rsResult.MoveFirst
-
Do until rsResult.EOF
-
amt = amt + rsResult![Total Allowed Claims]
-
rsResult.MoveNext
-
Loop
-
I have abandoned the SQL Query approach, and now am just using a giant Print statement in the loop. -
Function GenContTblPrnt(tblMinMax, MemberTbl, File_Name) As Integer
-
'?GenContTblPrnt("CTRanges", "15A", "C:\crap\test2.txt")
-
Dim MyDB As DAO.Database, rsMinMax As DAO.Recordset
-
Dim strSQL As String, strSQL2 As String, rsResult As DAO.Recordset, rsResult2 As DAO.Recordset
-
-
Set MyDB = CurrentDb()
-
'rsMinMax will consist of all Min/Max pairs in tblMinMax
-
Set rsMinMax = MyDB.OpenRecordset(tblMinMax, dbOpenSnapshot)
-
-
rsMinMax.MoveFirst
-
-
Do While Not rsMinMax.EOF
-
-
Debug.Print rsMinMax![Min], ";", rsMinMax![Max], ";", DCount("[Member ID]", MemberTbl, "[Total Allowed Claims] Between " & rsMinMax![Min] & " And " & rsMinMax![Max]), ";", DSum("[Total Allowed Claims]", MemberTbl, "[Total Allowed Claims] Between " & rsMinMax![Min] & " And " & rsMinMax![Max]), ";", DSum("[Member Months]", MemberTbl, "[Total Allowed Claims] Between " & rsMinMax![Min] & " And " & rsMinMax![Max])
-
rsMinMax.MoveNext
-
-
Loop
-
-
rsMinMax.Close
-
-
End Function
-
It works OK. Any advice on getting the output data into either a Table or Excel?
Thanks,
Wil
Create a table to hold the records. For this example lets call it tblResults -
Function GenContTblPrnt(tblMinMax, MemberTbl, File_Name) As Integer
-
'?GenContTblPrnt("CTRanges", "15A", "C:\crap\test2.txt")
-
Dim MyDB As DAO.Database, rsMinMax As DAO.Recordset
-
Dim strSQL As String, strSQL2 As String, rsResult As DAO.Recordset, rsResult2 As DAO.Recordset
-
-
Set MyDB = CurrentDb()
-
'rsMinMax will consist of all Min/Max pairs in tblMinMax
-
Set rsMinMax = MyDB.OpenRecordset(tblMinMax, dbOpenSnapshot)
-
-
rsMinMax.MoveFirst
-
-
Do While Not rsMinMax.EOF
-
-
Debug.Print rsMinMax![Min], ";", rsMinMax![Max], ";", DCount("[Member ID]", MemberTbl, "[Total Allowed Claims] Between " & rsMinMax![Min] & " And " & rsMinMax![Max]), ";",
-
DSum("[Total Allowed Claims]", MemberTbl, "[Total Allowed Claims] Between " & rsMinMax![Min] & " And " & rsMinMax![Max]), ";", DSum("[Member Months]", MemberTbl, "[Total Allowed Claims] Between " & rsMinMax![Min] & " And " & rsMinMax![Max])
-
-
strSQL = "INSERT INTO tblResults(MinAllowed, MaxAllowed, CountMembers, " & _
-
"TotalAllowed, TotalMonths) VALUES (" & rsMinMax![Min] & ", " & rsMinMax![Max] & ", " & _
-
DCount("[Member ID]", MemberTbl, "[Total Allowed Claims] Between " & rsMinMax![Min] & " And " & rsMinMax![Max]) & ", " & _
-
DSum("[Total Allowed Claims]", MemberTbl, "[Total Allowed Claims] Between " & rsMinMax![Min] & " And " & rsMinMax![Max]) & ", " & _
-
DSum("[Member Months]", MemberTbl, "[Total Allowed Claims] Between " & rsMinMax![Min] & " And " & rsMinMax![Max]) & ")"
-
-
DoCmd.RunSQL strSQL
-
-
rsMinMax.MoveNext
-
-
Loop
-
-
rsMinMax.Close
-
-
End Function
-
Mary
Thank you Mary.
It seems like with this solution I am required to have already created the Table tblResults. Is there a way I can create the Table from within my function, maybe even pass into the function the name of the table? For example, since I am passing in the name of the table from which to pull the data, can I create the output table to be named something like "input"_CT (where input is the MemberTbl)?
Try this ... -
Function GenContTblPrnt(tblMinMax, MemberTbl, File_Name) As Integer
-
'?GenContTblPrnt("CTRanges", "15A", "C:\crap\test2.txt")
-
Dim MyDB As DAO.Database, rsMinMax As DAO.Recordset
-
Dim strSQL As String, strSQL2 As String, rsResult As DAO.Recordset, rsResult2 As DAO.Recordset
-
-
Set MyDB = CurrentDb()
-
'rsMinMax will consist of all Min/Max pairs in tblMinMax
-
Set rsMinMax = MyDB.OpenRecordset(tblMinMax, dbOpenSnapshot)
-
-
rsMinMax.MoveFirst
-
-
Do While Not rsMinMax.EOF
-
-
Debug.Print rsMinMax![Min], ";", rsMinMax![Max], ";", DCount("[Member ID]", MemberTbl, "[Total Allowed Claims] Between " & rsMinMax![Min] & " And " & rsMinMax![Max]), ";",
-
DSum("[Total Allowed Claims]", MemberTbl, "[Total Allowed Claims] Between " & rsMinMax![Min] & " And " & rsMinMax![Max]), ";", DSum("[Member Months]", MemberTbl, "[Total Allowed Claims] Between " & rsMinMax![Min] & " And " & rsMinMax![Max])
-
-
strSQL = "SELECT " & rsMinMax![Min] & " As MinAllowed, " & _
-
rsMinMax![Max] & " As MaxAllowed, " & _
-
DCount("[Member ID]", MemberTbl, "[Total Allowed Claims] Between " & rsMinMax![Min] & " And " & rsMinMax![Max]) & " As CountMembers, " & _
-
DSum("[Total Allowed Claims]", MemberTbl, "[Total Allowed Claims] Between " & rsMinMax![Min] & " And " & rsMinMax![Max]) & " As TotalAllowed, " & _
-
DSum("[Member Months]", MemberTbl, "[Total Allowed Claims] Between " & rsMinMax![Min] & " And " & rsMinMax![Max]) & " As TotalMonths" & _
-
" INTO " & MemberTbl & "_CT"
-
-
DoCmd.RunSQL strSQL
-
-
rsMinMax.MoveNext
-
-
Loop
-
-
rsMinMax.Close
-
-
End Function
-
Mary
Actually, that won't work as it will just create a new table for every record.
Give me a few minutes to think about it.
OK, try this ... -
Function GenContTblPrnt(tblMinMax, MemberTbl, File_Name) As Integer
-
'?GenContTblPrnt("CTRanges", "15A", "C:\crap\test2.txt")
-
Dim MyDB As DAO.Database, rsMinMax As DAO.Recordset
-
Dim strSQL As String, strSQL2 As String, rsResult As DAO.Recordset, rsResult2 As DAO.Recordset
-
-
Set MyDB = CurrentDb()
-
'rsMinMax will consist of all Min/Max pairs in tblMinMax
-
Set rsMinMax = MyDB.OpenRecordset(tblMinMax, dbOpenSnapshot)
-
-
rsMinMax.MoveFirst
-
-
strSQL = "SELECT " & rsMinMax![Min] & " As MinAllowed, " & _
-
rsMinMax![Max] & " As MaxAllowed, " & _
-
DCount("[Member ID]", MemberTbl, "[Total Allowed Claims] Between " & rsMinMax![Min] & " And " & rsMinMax![Max]) & " As CountMembers, " & _
-
DSum("[Total Allowed Claims]", MemberTbl, "[Total Allowed Claims] Between " & rsMinMax![Min] & " And " & rsMinMax![Max]) & " As TotalAllowed, " & _
-
DSum("[Member Months]", MemberTbl, "[Total Allowed Claims] Between " & rsMinMax![Min] & " And " & rsMinMax![Max]) & " As TotalMonths" & _
-
" INTO " & MemberTbl & "_CT"
-
-
DoCmd.RunSQL strSQL
-
-
Do While Not rsMinMax.EOF
-
-
rsMinMax.MoveNext
-
-
strSQL = "INSERT INTO tblResults(MinAllowed, MaxAllowed, CountMembers, " & _
-
"TotalAllowed, TotalMonths) VALUES (" & rsMinMax![Min] & ", " & rsMinMax![Max] & ", " & _
-
DCount("[Member ID]", MemberTbl, "[Total Allowed Claims] Between " & rsMinMax![Min] & " And " & rsMinMax![Max]) & ", " & _
-
DSum("[Total Allowed Claims]", MemberTbl, "[Total Allowed Claims] Between " & rsMinMax![Min] & " And " & rsMinMax![Max]) & ", " & _
-
DSum("[Member Months]", MemberTbl, "[Total Allowed Claims] Between " & rsMinMax![Min] & " And " & rsMinMax![Max]) & ")"
-
-
DoCmd.RunSQL strSQL
-
-
Loop
-
-
rsMinMax.Close
-
-
End Function
-
Mary
Sign in to post your reply or Sign up for a free account.
Similar topics
by: davidv |
last post by:
I am building a very simple form that takes text and inserts data in a
MySQL db.
I would like my "logic" to simply insert the value in to the field in
the database that matches the name from the...
|
by: Nick Truscott |
last post by:
<?
// scoreinput.php - input a match score when match selected from list
?>
<html>
<head>
<basefont face="Verdana">
</head>
<body>
|
by: cover |
last post by:
I have a table with 50 fields that receive input depending on whether
that input came in from a 'shaker' form or a 'conveyor' form. Input
from the 'conveyor' form might populate 25 fields while...
|
by: Jaye |
last post by:
Hi. I am a relative newbie to ASP and I am working on an application that uses ASP and an Oracle 9i database. I have a form that allows the user to query the database by selecting a client name(s)...
|
by: stepterr |
last post by:
I have a form that is built based on a query. Everything is working except when I submit the form the radio buttons are only updating the first row in my database. dcategory and dthumbnail are two...
|
by: TechnoAtif |
last post by:
Hi ALL
I have entered some array values using checkboxes into mysql database through a form. Next iam creating a searchpage where all those cateogories inserted through checkboxes has to be...
|
by: zion4ever |
last post by:
Hello good people,
Please bear with me as this is my first post and I am relative new to ASP. I do have VB6 experience. I have a form which enables users within our company to do an intranet...
|
by: totomalas |
last post by:
I have developed a report in Access 2007 that runs on three queries, each promting an input from the user...this report is used for a meeting and it should be printed nine times...what I do now is...
|
by: totomalas |
last post by:
I have developed a report in Access 2007 that runs on three queries, each promting an input from the user...this report is used for a meeting and it should be printed nine times...what I do now is...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
| |