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:

More topics

 

Format fields in Make Table Query

Preview
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.
 

Adding 2 Fields together..returns error if no value

Preview
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.
 

Queries : All about the Query

Preview
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 more than 16 fields to a query

Preview
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.
 

Counting specific fields within a table/query

Preview
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

Preview
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.
 

The Structured Query Language (SQL)

Preview
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

Preview
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 table as a look up field and adding to existing table

Preview
I want to use a 2nd table as a lookup field on my main table(permits) and have the chosen fields added to the permit table fields using a form. If I change the field to a lookup using the2nd table (contractors) how do I pull the additional fields into the form/1st table?

I also tried creating a new form w/fields from both tables after adding a relationship but the form will not allow me to add any new records. .
 

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

Preview
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.