Topics Search

adding fields in query

adding fields in query
Views: 3
all, using access 2003. have table contains number fields. I am using a query in a subform. I want to add the number fields to place them on a field called total charges. please help. this is what I am placing in the query

TOTALCHARGES: DSum([NUM_TRANSCHG],[NUM_FUELSURCHG],[NUM_ACCESCHG],[NUM_OTHERCHG])

its returning a error about wrong # of arguments
Sponsored Links:

Similar posts...

 

Format fields in Make Table Query

Format fields in Make Table Query Icon
Field lenth, etc inside a make table query. I have a query that creates a table based on customer data, but at the same time, I am adding new fields that do not exist on any table and I want to define the data type, length etc.

inside the make table query so that the query creates the table as I need it. The table that is made is used in queries later down the road.

For all fields that I am adding, I am setting the value of the field to Null.
 

Queries : All about the Query

Queries : All about the Query Icon
This tutorial covers: Types of queries, Creating a query, The Design view, Adding fields, Defining calculated fields, Forming expressions, Column headings, Changing the order of the fields, Saving the query, Running the query, Modifying the query design, Ordering rows, Selecting rows, Conditions ,Multitable queries, Joining tables and The external join
 

Adding 2 Fields together..returns error if no value

Adding 2 Fields together..returns error if no value Icon
This is Driving me crazy, I am trying to add the value of 2 Fields together in a seperate field on a form, everything works fine and I get a total no problem.until one of the two fields I am adding has no value in it, then I get #Error!
Sometimes there will be no value in one or both of the fields I cant avoid that.
 

Adding more than 16 fields to a query

Adding more than 16 fields to a query Icon
This is a pretty simple question: how can you add more than 16 fields to a query? I know the maximum allowed is over 50 but in design view there are only 16 standard but I have to add more.
 

The Structured Query Language

The Structured Query Language Icon
So far, to create a query we have learned to use either the Query Wizard or the Design View of a query. In both cases, we were selecting fields and adding them to the query. This concept of building a query is based on the Structured Query Language abbreviated SQL. In fact, all queries are based on SQL and this language is used by most database development environments, including Microsoft Access.
 

Counting specific fields within a table/query

Counting specific fields within a table/query Icon
I have 32 fields and each has the ability for 3 different types of input (S,H,EL)
I want to count each field based on the table for the type, so if field1=S and field 2=S then TotalS would be 2 just for that table.

I need to do this to all 31 fields with all 3 selections for each.

I can do this with IF logic using a counter for adding but I really want to do this the proper way
 

The Structured Query Language (SQL)

The Structured Query Language (SQL) Icon
So far, to create a query we have learned to use either the Query Wizard or the Design View of a query. In both cases, we were selecting fields and adding them to the query. This concept of building a query is based on the Structured Query Language abbreviated SQL. In fact, all queries are based on SQL and this language is used by most database development environments, including Microsoft Access.
 

Microsoft can't append all the records

Microsoft can't append all the records Icon
I have two tables, table 1 has 19 fields. Table 2 has 18 fields. Table 2 has one field table 1 does not have. Table 1 has two fields table 2 does not have. I changed field names so that they both coincide and all fields of text type have a Yes in AllowZeroLength and a No in Required. I tried to run an append query adding only the fields that both tables have in common, to transfer the data from table 2 to table 1. I then get the usual message: can't append all the records in the append query. Microsoft Access set 0 fields to Null blah blah. Of the 109 records I wanted to append it only appended 17 and I can't understand what is different about these records or all the others!
 

Using a Yes/No field to trigger a calculation in another field

Using a Yes/No field to trigger a calculation in another field Icon
I have a billing form that was created from a query based on the table that all these fields are from. In this billing query is where all these calculations are happening so they can be displayed on the billing form.

TotalTuitions is a field that exists in my main table and it is calculated in the billing query by adding (4) other tuition type fields.

MultiClassDisc is a field in my main table and is in the billing query.

MultiClassTrigger is a field in my main table that works from a Yes/No combo box. This will also be in the billing query.
 

Append Query to append fields to other fields

Append Query to append fields to other fields Icon
I have a Append Query to append fields to other fields. One of the fields is call Baptism (h1). When I go to run the query it tells me that Baptism(h1) does not exist. When I add a space again between Baptism (h1) the query will work. HoweverI have a command button for the user, and they will not know to adjust the query each time.
 
Sponsored Links: