Hi all, i am a newbie to this game and want to know if it is possible
with VBA to count up all the rows for a specific field for a table or
average or sum ?
If it is possible, could you help me with some code please.
I add up fields succesfully with the following :-
myLcPo = Nz(DSum("[Total LC PO's]", _
"tblTotalLcPO's ", "[ByrName] = ""Kufner""" ), 0) + Nz(DSum("[Total LC
PO's]", "tblTotalLcPO's ", "[ByrName] = ""Steyn""") , 0)
Tempy
*** Sent via Developersdex http://www.developersdex.com *** 1 1645
You seem to answer your own question.
What is it you want to achieve in the end? I can hardly imagine you want
to have some sum, or average, or table :-) in memory for as long as your
code runs. But not longer.
Maybe you really want to create a report?
Tempy wrote: Hi all, i am a newbie to this game and want to know if it is possible with VBA to count up all the rows for a specific field for a table or average or sum ? If it is possible, could you help me with some code please.
I add up fields succesfully with the following :-
myLcPo = Nz(DSum("[Total LC PO's]", _ "tblTotalLcPO's ", "[ByrName] = ""Kufner""" ), 0) + Nz(DSum("[Total LC PO's]", "tblTotalLcPO's ", "[ByrName] = ""Steyn""") , 0) Tempy
*** Sent via Developersdex http://www.developersdex.com ***
--
Bas Cost Budde, Holland http://www.heuveltop.nl/BasCB/msac_index.html This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Hari Om |
last post by:
Here are the details of my error log files:
I execute the command and get following message at console:
----------------------------------------------------------------------
../sqlldr scott/tiger@common control=/full_path/test.ctl
log=/full_path/adhoc/test.log
SQL*Loader: Release 9.2.0.1.0 - Production on Tue Sep 2 10:49:27 2003
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
|
by: John |
last post by:
I've got a single table I need to query to return records that have no
"related records."
Table dataset example:
1. John, Biology
2. Dave, Math
3. Susan, Biology
4. Betty, Sociology
The query should return this dataset:
|
by: DataFreakFromUtah |
last post by:
Hello!
No question here, just a procedure for the archive.
Search critera:
count records imported count data imported count number of rows
imported
count number of records imported record import count automatically
import
and count records prompt for number of records imported import count
auto-import records
autoimport records count records before and after
|
by: Lauren Quantrell |
last post by:
I am using a stored procedure as the recordsource on an MS-Access2000
form:
Forms!frmName.RecordSource = "dbo.myStoredProcedure"
The stored procedure creates a temp table #Contacts and then inserts
matching KeyID values contacts into it. Then I use a union query in
the same stored procedure to create the actual recordset.
What I want to know is how I can return the number of records in the
temp table #Contacts back to MS Access and...
|
by: Peter W Johnson |
last post by:
Hi guys,
I have a problem with a datagrid record count. Here is the code:-
<snip>
Public Class frmMerchantDeposit
Inherits System.Windows.Forms.Form
Dim myconnection As New Odbc.OdbcConnection("DSN=database")
| |
by: Anuradha |
last post by:
Dear Experts
How can I count records in a data reader?
Thx
Anuradha
|
by: rn5a |
last post by:
A SQL Server 2005 stored procedure expects a parameter 'UserID'
depending upon which it retrieves the no. of records & OrderIDs
corresponding to the 'UserID' from a DB table (note that OrderID &
UserID are two of the columns in the DB table). So for e.g. consider a
user whose UserID=6 & the DB table has 3 records whose UserID=6. In
other words, there are 3 OrderID records of the user whose UserID=6,
say, OrderID=8, OrderID=17 & OrderID=29....
|
by: MLH |
last post by:
A mailing list table in its virgin state contained sequential,
consecutive integers in an autonumber field (A97). I've deleted
records throughout the table. Now I would like to identify each
skipped number. Hmmm??? If I'd had a boolean field named
, I could-a-check-marked it and they would-a-been much
easier to count.
How could I determine that 3 numbers were missing from the
following sequence: 1 2 4 5 7 9 and record those...
|
by: markrawlingson |
last post by:
Hopefully someone can help me out with this, it's driving me nuts...
I have two tables - We'll call them table1 and table2. Table1 holds event information, and table2 holds user registration data pertaining to each event in table1. So for each record in Table1 there could be hundreds of records pertaining to that record in Table2 - I am trying to count those records (to reveal the number of people registered for the event held in table1)
I...
|
by: petter |
last post by:
Hi!
I have two questions: one question that regards the COUNT-function, and one about how to display a month even if I don’t have any data for that month.
I have an Access database where I want to create a query to count all the internal units in my list (the “input”-table), between two dates. I want my list to be grouped by year and month. Here is the SQL-code, as called from VBA:
strSQL_INTU1 = "PARAMETERS DateTime, DateTime;" _
...
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| | |