Formatnumber To Format A Sum Field In Query?

Feb 29, 2008

I have a query that calculates a sum like this:

Sum: [table1]![field1]*[table1]![field2]

I would like result to have 2 decimal places.

I tried to use formatnumber like this:

Formatnumber(Sum: [table1]![field1]*[table1]![field2];2)

But I get syntax error. please help with the correct formula.

View Replies


ADVERTISEMENT

FormatNumber

May 2, 2005

I am trying to use a query I made with a newer version of Access on an older one. The older one does not recognize the 'FormatNumber' function and I believe this has to do with the fact that it uses the Microsoft 9.0 Object Library. Is there an equivalent to the FormatNumber function in 9.0?

Thanks
Beatrix

View 3 Replies View Related

Format Query Field To Currency

Aug 24, 2007

I have a calculated field in my query that takes the difference between to incomes. I want to format this field to currency. How can this be done?

View 1 Replies View Related

Query Based On Format Of A Field

Feb 6, 2006

All,

I have a Postcode field in my table and I want to be able to check the data to make sure that it is a correct UK postcode.

Is there away that I can find out the format of the data, to be able to run a query against it, or is there a better way of doing it?

I need to account for all types of UK postcodes (A1 2BC, A12 3BC, AB12 3CD, WC2A 3BC). There are also foreign postcodes in this field.

Help appreciated!

View 2 Replies View Related

Forms :: Assign Field With Special Format Based On Date / Time Format

Feb 17, 2014

I wanted to assign the field "Number of magazine" with special format based on date/time format but showing only year and month in the format: "yyyy-mm".

So in property of this field in format I put yyyy-mm and in input mask I type 0000-00;;-

I also created the form based on the table containing above field and I defined format and input mask for corresponding formant in the same way like at the table.

But if I try to type date for example 2014-01 in text box of the form it comes up with the full date 2014-01-01. Why does it do like this? What do I do incorrectly?

View 2 Replies View Related

Format Numbers In Query Text Field?

Nov 10, 2005

I have a field in a query that contains numbers and text (text field). The numbers displayed come from a percent calculation and display with many decimals ie, .99898745987245. Is there a way to eliminate the decimals with code in the query field? For example .99898745987245 to equal 99%? I can’t format the field as a number or percent because it has both text and numbers. HELP!!
Thanks

View 5 Replies View Related

Format Field In Make Table Query

Feb 27, 2007

DB Setup:
Table1: I have a table (Vendor) that has 2 fields (# & Name) with # being an AutoNumber. So only Name is being input via a form. I have formatted the autonumber field as 000;(000).
Table2: A table that is populated via form with invoice info etc and vendor number is added through a drop down combo box (which also has the above format on it)
Table3: Similar to table2, with slightly diff info but still vendor #

Query1: Is a make table that consolidates table 1 & 2 via union on like fields (ie vendor #) This make table also has the format from above in its properties field, although when i open the table it makes (Table4) the vendor field is not formatted as i need it. So 3 appears as 3 not 003.

Query2: takes table4 adds some extra info and exports file (as txt or xls)using outputTo & TransferText macro so that it can be loaded into a Hyperion Essbase system

My problem is that although the field value is formatted as 003 in appearance, when i take it to excel it changes back to 3 when i need it to stay as 003. I would like the make table query to also format the tables field as 000. Is the problem with the autonumber in the orig table or is it simply excel being stubborn when i take it there. If i changed the vendor field to text string in the make table would i still be able to link it back to the orig vendor table to get the names etc (ie number field linked to text field??)
Thanks in advance

View 1 Replies View Related

Setting A Format In A Field In A Union Query

Jun 21, 2007

Hi everyone,

Please would someone be able to help me?
I have created a union query however, one of the columns, has not picked up the same format as it has in the tables. As in the tables it has this format
'00000'.

Please woud you be able to advise me how I can change the format on one of the 'columns' in my union query. As one column is 'numbers' and the other is 'text'. I need to change the number column so the format is '00000'.

Thank you in advance for your help.

Nats

View 5 Replies View Related

Queries :: Change Field Format Within A Query

Sep 23, 2013

I'm having a format problem. I have a query (Q1) that, among other things format a date field as YYYYMM (Field1).

I have a second query (Q2) whose data source is Q1.

In Q2 I need to link Q1 to a table but Field1 is being reformatted as text (confirmed by running a make table query).

I want Field1 to be Number format to eliminate a mismatch error.

I know how to change the format of a field in a table using VBA but I cant seem to find a way of changing the format within a query.

View 2 Replies View Related

How To Set Format Of A Field In Make Table Query

Sep 9, 2015

I have numerous databases that I use with make tables in there, these will often contain Currency values that we need to be set as just General Numbers. We can get it to work in the Query but whenever we run the query, the table it makes always shows up as currency.

Is there a way so that the table created will automatically be just General numbers...

View 2 Replies View Related

Format Of Field Produces Error In Query Calculation

Apr 24, 2005

I have a query that add up the numeric values in a value list assinged in a combo box in response to each question, the row source for question 15 for exmaple is as follows:

ROW SOURCE: 0;"I have no idea";5;"I indicated that I wouldn’t have time today";0;"Was mentioned early on and then not offered again";5;"The salesperson said the vehicle wasn’t available"

I then run a query that adds together the responses to 3 questions, including question 15, the field in the query appearing as follows:

LS5: ([q14]+[q15]+[q16])

It was working fine but has stopped working, the fault lies with q15, if I take it out it works again. So I looked at the table as I am sure it must be the way it is set up, why it worked before I don't know and I attach a screen shot of how the field is set up in the table, which is no different to q14 and q16.

Anyone got any ideas?

One last thing is that it makes no difference if the fileds contain a number (including zero) or are blank

View 7 Replies View Related

Format Field Output Of A Complex Expression In Query.

Feb 8, 2006

I have a simple query to calcualte a profit margin on daily sales lines and I use a quick and dirty expression to calculate the margin in the query so I never need to drill it down further than that level (I don't want to go as far as putting the output into a report as it is only for use when double checking lines for errors which get fixed there and then in the database).

So far so good, however the margin output is a bit awkward to read as I can't seem to format it as a simple percentage. The field properties page doesn't like doing anything with the expression and even typing in a format manually has no effect, so I end up with figures like

36.7768595041322
38.6666666666667
15.6448202959831
etc


the expression i use is:

Margin: IIf([dbo_tbl_sales_invoice_lines.price]=0,"",([dbo_tbl_sales_invoice_lines.price]-[net_cost])/[dbo_tbl_sales_invoice_lines.price]*100)

Is there any way to format this output to show only 1-2 decimal places and be in a proper number format so I can sort them in ascending order properly?

View 7 Replies View Related

Query Field-heading Format: Tablename.Fieldname?

Nov 30, 2006

Im running a query and normally there is only a field-name in heading. I have
multiple tables with equal field names. Now I want to get table names in
heading too (Tablename.Fieldname) so I can make difference between fields on each tables when previewing query. Is this possible in access? I don't want to change all field-names manually, I know it's possible and done easily, but there are almost hundred fieldnames...

Im finding a solution. Help me please. Thanks :eek:

- Roger
--
Have a nice day.

View 1 Replies View Related

Queries :: Changing Field Format In Append Query

Dec 3, 2014

I am using an append query to move data into another database. One of the fields being imported is a date field in text form (20141201). I need it appear in the final database in text form (01/12/14) I have tried using several date conversions and cant get this work. Ideally i need the final value as a text rather than date.

View 8 Replies View Related

Query Date From DateTime - General Date Format Field.

Mar 10, 2006

I have a date and time stamp in a Date/Time field of General Date format (3/1/2006 7:52:25 AM).

I wish to select query on the table's Date/Time field by date portion only (3/1/2006) and not include the time portion (7:52:25 AM) of the field.

Using this expression in the query's criteria - "Between [Enter Start Date: (MM/DD/YY Format)] And [End Date: (MM/DD/YY]" will not return the date ranges as desired without also typing in the full time string.

How can the date integer be parsed out and the query properly expression ed on the criteria field without using VB?

View 7 Replies View Related

Forms :: Conditional Format One Field To Alter A Second Field

Jun 26, 2015

Have a continuous form with 2 date fields in each record .

If dateField1 is empty ,Then I want a way to make DateField2 Take its Place .

I know how to make things happen with conditional formatting on one field by UsingIsNull ,I have tried sending datefield2 to back.But cant work out how to bring it to front If DateField1 IsNull.

View 3 Replies View Related

Format Field

Jan 25, 2008

Hi,

I have this code which makes all the data displayed on the form in this respective field capital letters e.g John will be displayed as JOHN and saved as so.

However, what i want to do is only make the first letter as John not JOHN. How can I change the code?

Me.surname_forename = UCase(Me.surname_forename)

Thanks

View 5 Replies View Related

Format Of A Field

Oct 7, 2005

I have changed the inputmask of a field based on an if statement. however i put / characters in place and it wont leave them there can anyone help.

Me.txtbox = "AAAAA/AAA/AA"

View 5 Replies View Related

Field Data Format

Oct 11, 2006

I want my PRODID (PK, AutoNumber) field to have "PROD-" before the number, i thought it could be done by seting format to "PROD-"# but that only displays it inside MS A, when i use sql queries through php it only retreives the number. How can i avheve this?

View 3 Replies View Related

Format Date Field

Feb 19, 2007

I saw a thread once that explained how to format a date or phone number field after you've entered the data, but I can't find it again.You do it so that you don't have the __/__/__ or the ___-___-____ pop up in the field and don't have to worry about inadvertently starting typing the data in the middle of the field instead of the beginning.Anybody know where that thread is at, or know how to do that?

View 2 Replies View Related

Format Variances Within Field

Mar 11, 2008

Is there a way, either in a form or report, to modify the format of a text string within a field?

Basically, we are gathering text data using a memo field (due to the amount of data) and would like to highlight sections of the text by making it bold. It does appear that in Access a field is all or nothing in terms of formatting.

Can one put characters that would identify the start or end of such a string in the data itself?

Thanks.

View 2 Replies View Related

Calc'd Field Won't Format?

Aug 11, 2006

I have a calc'd percentage field in my query. This is a multi user app and the problem is that is can (and does often) happen that the numerator information for my calc gets entered before the denominator data and therefore the calc'd field shows and as an error.

I attempted to use a simple IIF statement to input a message rater than the error code but now the field will not format to Percent. It worked, I got the message to display and it calc'd the records that had data, it just will not display in percent format. It does let me set the format to percent, it just doesn't display and does not allow the decimal places to be set.

This was the line:
CalcPercent:[Numerator]/[Denominator]

This is the new line:
NewCalcPercent:IIf([Denominator] = 0, "Message", [Numerator]/[ Denominator])

I've tried to search for an answer and I'm sure it is going to be something simple that I've overlooked.

Any thoughts?:confused:

View 3 Replies View Related

Format Field To Date

May 17, 2007

I have two tables that I import that have both a date field and a time field formated as text. date field looks like yyyymmdd and time looks like hhmmss. I am using two append queries that combine the data into one table and I need the date and time fields to be date and time format respectively. When I run the query as is I get no values in either the date or the time field due to a data tyoe mismatch. My question is how do I convert the input table date and time text type fields to date and tie format for the append query.

Thanks for the help

Tony

View 2 Replies View Related

How To Change Field Format

Oct 25, 2006

Hello. I'm triyng to change every field format in a Form each time I jump from one field to another. I want it to get grey and bold when it got the focus

I managed it with a GetFocus and Lost Focus for each field but whena form has a lot of fields it gets "a lot" of programing.

Is there a way of doing it another way, for instance On current

Thanks

View 5 Replies View Related

Queries :: Format Field In SQL

Aug 28, 2013

If I'm working strictly from SQL, is there a way to format a field as currency, standard number, etc. without using the format() function? Basically the equivalent of setting the format in the property sheet in design view, without going to design view.

View 1 Replies View Related

Change Field Format Using VBA

Sep 21, 2014

I have a table that contains information along with a field named "Date Input" and then a calculated field called "Due NLT Date". New records are appended to this table daily. The calculated "Due NLT Date" field is simply "[Date Input]+5".

In some unforeseen circumstances the "Due NLT Date" field needs to be extended to 6 or 7 days from the "Date Input". I am trying to find a way adjust the number of days using a command button/VBA getting the desired number of days either from an input box or from a txt box on a form.

I have been playing with using SQL ALTER TABLE in VBA but can't get it to work.

I'd image it would look something like this but how to write it correctly:

RunSQL ALTER TABLE "table" FIELD "field" to calculated "[Date Input]+ & input box "Enter number of days""

View 5 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved