Stupid Question

  • Thread starter Thread starter AIS DBA
  • Start date Start date
A

AIS DBA

Hi - I'm new to Access, and all self taught - I'm use to
Lotus notes. I need help:

This sould be a simple little counter for our receptionist
to increment the count of number of faxes that come in to
our central fax machine for our salesmen, by clicking on a
button.

I have a "Employees" table with five fields:

EmployeeID - Autonumber
First Name - Text
Last Name - Text
Quotes Total - Number (LI - new values Increment)
Sales Total - Number (LI - new values Increment)


I have a form. I want to be able to increment Quotes Total
and Sales total by one by clicking on a button.

In my On Click Event I have:
=SUM(Employees![QuotesTotal]+1)

I get the error-

The expression On Click you enetered as the event property
produced the folllowing error. The object doesn't contain
the automation object 'Employees.'.

What am I doing wrong?


Any help would be appreciated. The MS knowledge base
wasn't much help.
 
AIS DBA said:
Hi - I'm new to Access, and all self taught - I'm use to
Lotus notes. I need help:

This sould be a simple little counter for our receptionist
to increment the count of number of faxes that come in to
our central fax machine for our salesmen, by clicking on a
button.

I have a "Employees" table with five fields:

EmployeeID - Autonumber
First Name - Text
Last Name - Text
Quotes Total - Number (LI - new values Increment)
Sales Total - Number (LI - new values Increment)


I have a form. I want to be able to increment Quotes Total
and Sales total by one by clicking on a button.

In my On Click Event I have:
=SUM(Employees![QuotesTotal]+1)

Normal aggregate functions (like Sum()) are intended to be used within a query, form,
or report and they only take fields or expressions as arguments. In other words they
assume that everything within the parenthesis is a constant or a field present in the
container objects RecordSet. If you want to aggregate data "off in some other table"
then you need to use the Domain Aggregate functions. They work similarly, but have
an additional argument that indicates what table/query they should be looking at when
doing their calculation and they also provide for a WHERE argument to further refine
the results.

In your case you would use DSum("[QuoteTotals]", "Employees") + 1
 
It's a bit simpler than that. All you need is in the
click event is:

[QuotesTotal]=[QuotesTotal]+1

Hope this helps,
Helen
-----Original Message-----
Hi - I'm new to Access, and all self taught - I'm use to
Lotus notes. I need help:

This sould be a simple little counter for our receptionist
to increment the count of number of faxes that come in to
our central fax machine for our salesmen, by clicking on a
button.

I have a "Employees" table with five fields:

EmployeeID - Autonumber
First Name - Text
Last Name - Text
Quotes Total - Number (LI - new values Increment)
Sales Total - Number (LI - new values Increment)


I have a form. I want to be able to increment Quotes Total
and Sales total by one by clicking on a button.

In my On Click Event I have:
=SUM(Employees![QuotesTotal]+1)

I get the error-

The expression On Click you enetered as the event property
produced the folllowing error. The object doesn't contain
the automation object 'Employees.'.

What am I doing wrong?


Any help would be appreciated. The MS knowledge base
wasn't much help.


.
 
Back
Top