Question On Printing A Negative Number In Brackets: -5 -> (5)

Sep 7, 2004

I want to print negative numbers in brackets without the negative sign:
-5 beccomes (5)
I am doing this on a control that I am summing on. Currently this is what I am doing in the "Control Source" field.
IIF(Sum([field]) < 0, "(" & -Sum([field]) & ")", Sum([field]))

This works, however, I would assume it is running the sum 3 times (I do not know access internals, I may be wrong and would like to be corrected).

Is there a way to do this using the "Format" field??

Thank You
newbie and learning

View Replies


ADVERTISEMENT

Tables :: Showing Negative Numbers In Brackets Without Selecting Currency Format

Jul 7, 2014

Is there a way to show negative numbers in brackets without selecting the Currency format?

I want to show (75,000.00) and not -75,000.00

View 2 Replies View Related

How To Split Letter&number Field Into 2 Column And Skip Brackets?

Dec 2, 2005

HI!
I have big problem I have telephone number field like this
Tel(XX)XXXXX - X are numbers

I have to split it into two columns and skip brackets like this

Column1 - Tel
Column2 - XXXXXXX

Is it possible?

I have no idea how to manage it...I'd be very thankful for any
examples ? Or Help....I'm beginner

Thanks a lot
in Advance

View 1 Replies View Related

Convert Positive Number To Negative Number

Nov 22, 2011

This has to be a simple way to convert a positive number to a negative number. For example, convert 5 to -5. The field is quanitity and I wanted to convert to negative number. I tried to use negative = "-" & [quantity] but it doesn't work.

View 2 Replies View Related

Setting A Negative Number To 0

Jul 26, 2007

Hello all, i have a calculation in a report that sometimes results in a negative number. is there anyway to make that negative number = 0 or equal to a specific text?

View 3 Replies View Related

If Value Is A Negative Number, Display 0

Dec 14, 2006

On my "timesheet" for my volunteer database, I have a textbox called HoursRemaining. It's control source is =[HoursRequired]-[HoursCompleted]
That works great. Occationally however, the volunteer will complete more hours than required. Instead of displaying a negative number, I would like HoursRemaining to display 0.

Can this be done?

Thanks
ScrmingWhisprs

View 3 Replies View Related

Sum Produces Negative Number - I Want Positive

Jul 2, 2005

What is the format to change the negative to a positive when:

=Sum([Field]="Novice")

Text box in report

View 5 Replies View Related

Queries :: Display Negative Number As HH:MM

Jul 9, 2015

I'm converting minutes to display as HH:MM but have an issue when the number is negative. How to write this so I don't end up with a negative in front of the minutes?

Format([Variance]60,"00") & ":" & Format(([Variance] Mod 60),"00")

i.e. -193 gives me -03:-13, whereas I would like -03:13

View 14 Replies View Related

Queries :: Convert String To Positive / Negative Number

Feb 24, 2015

I have an expression that converts a string to positive/negative number. It seems to be working fine, however, it doesn't convert "00000000001}" to -10. It shows as 10.

This is the formula that I am using in my query:

PJUNAccrual: IIf(Right([PJ_ACCRUAL_ADJ_X],1) Between "J" And "S",-1,1)*(Val([PJ_ACCRUAL_ADJ_X])/IIf(IsNumeric([PJ_ACCRUAL_ADJ_X]),100,10)+(IIf(Right([PJ_ACCRUAL_ADJ_X],1) Between "A" And "I",(Asc(Right([PJ_ACCRUAL_ADJ_X],1))-64)/100,0))+(IIf(Right([PJ_ACCRUAL_ADJ_X],1) Between "J" And "S",(Asc(Right([PJ_ACCRUAL_ADJ_X],1))-73)/100,0)))*100

View 1 Replies View Related

Queries :: Purchase Order - Negative To Positive Number

Aug 14, 2014

This query tell me what quantity I am short of to make a part

diffqty: [StockQty]+[OnOrderQty]+[PendingQty]-Sum([OrderQty]*[ProductQty])

This will return a negative quanity iE -200

what I then would do is copy that to a purchase order but remove the negative sign can this can the formula be changed in anyway to give the positive number .

View 3 Replies View Related

Forms :: Textbox With Exclamation Mark If Value Is Negative Or Actual Number If Positive

Nov 5, 2014

Is it possible to format a textbox such that a negative value doesn't show numerically but in some other form (like a cross or exclamation mark from the Wingdings font, for example?)

I have a couple of textboxes which take their values from a function. The function is designed to return a long integer value which should always be greater than or equal to zero (the function counts the number of outstanding e-mails in a given Outlook folder, hence it should always be zero or higher)

However, as part of my error handling, if the function can't connect to the Outlook folder for whatever reason (for example, if the user does not have the appropriate permissions, or they do not have it mapped etc.), then it returns -1 (so I have some sort of value to identify a fail)

So currently, if such an error occurs, my textbox(es) will show -1 (and I can use conditional formatting to highlight this)

But it would be nice if it showed an "X" or "!" instead, and only showed the numerical value for 0 or positive. Is this possible?

View 14 Replies View Related

Tables :: Convert Positive Number To Negative Based On Another Field In A Table

Jun 1, 2013

I am trying to create a table for income and expense [catergory] and would like the amount being entered into the [amount] field to have a negative or positive value on entering based on the category chosen.

so in my table I have

[catergory] which is chosen from a look up table ( which is either an INCOME or EXPENSE )
[amount] which is entered in the next field ( which has to return a positive or negative value based on the catergory choosen upon entering the data)

I would like to go one step further and indicate this negative value in red is possible in my FORM.

View 3 Replies View Related

Printing A Refport Based On Form ID Number

Jan 16, 2006

Hi all,

Im trying to print a report from a form. I want the report to have the contents of the forms current record.

The underlying table has an autonumber as it's index/primary key and it's this im referencing. What happens is a record is saved and the autonumber is generated.


DoCmd.OpenReport stDocName, acPreview, , Me.RefID.Value ' the value of the forms id box

= [RefId]' the value on the report

The problem i have is this:

when i ask it to return the record which shares the id number of the current form record i get a blank report with no error.

when i ask it to return the record equal to a specific record number - by swapping the varibale for a fixed value i get all records- can anyone suggets what is going on here?

greg

View 3 Replies View Related

Where To Put The Brackets?

Aug 29, 2005

Greetings all,

Continuing to work on my problem and I am now getting and error of '3075' - syntax error (missing operator) in query expression

the error line is

strSQL = strSQL & "HAVING (tbl_data_DispatchDetails.TradingName) = " & varVal2 & " AND (tbl_Data_DispatchLineitems.WineNumber) = " & VarVal0


(I have to admit query language is not my strength)

Thanks in advance.

rbinder

View 3 Replies View Related

Too Many Brackets Query Sql Statement

Mar 1, 2006

WHERE (((zEnquiries.Enq_Forname) Like '*' & Forms!Enquiry_Search!Search2 & '*'))

this statement im sure has too many brackets.. can someone correct it for me

View 2 Replies View Related

Calculate Percentage Within Currency Brackets

Jan 7, 2008

Hey,

I'm unsure of how to do this one, any help would be appreciated.

The database I'm working on has around 2000 records within the parent table. These reflect projects around the world.

the child table has records on how much these projects cost.

I would like to calculate the % of projects cost less than £50,000, then, the % of projects between £50,000-£100,000 and so on.

i'm not entirely sure how to do this, anyone have any ideas?

Thanks

View 1 Replies View Related

Using Square Brackets As Criteria In A LIKE Statement

May 1, 2008

I need to use square brackets as part of the criteria in a LIKE SQL statement. The criteria is:

[ABC123][SR]

ie, find all records which have that as part of a longer text string. How can I amend the SQL statement below to "escape" the square brackets and treat them as part of the string?

SELECT * FROM p_Overall WHERE (((p_Overall.Assigned_Dept)="ICONS_IMAC")) OR (((p_Overall.Brief_Description) Like '*[ABC123][SR]*'));

Help!!!!

Thanks in advance :-)

View 3 Replies View Related

How Do I Eliminate Brackets In MERGED Column

Nov 4, 2004

I recently MERGED two columns in a database file using the following code:

SELECT "(" & RESULT & ") " & QUALIFIER AS MERGED FROM SOIL_STL3_MERGE AS SOIL_STL3_MERGE;

The RESULT field was a number which I had to change to a TEXT field since my QUALIFIER was a TEXT field. Anyway the result was the field called MERGED which depicted the data as follows:

(100) U
(500) U
......
.......
I use the Find and Replace twice to get rid of the first ( and run it again to get rid of ) resulting in a field that looks like this:

100 U
500 U

My question is can I solve this through an UPDATE query statement through SQL or some other way with a function.

I would rather automate the removal of the ( ) or change my original code to NOT put brackets around my result.

Any and all help is most appreciated.

I thk you all in advance.

the raven man

View 4 Replies View Related

Modules & VBA :: Extract The Text Within The Brackets From String?

Nov 23, 2014

I have a column containing records of the timestamp of an event. I need to extract the date out of each of these records and put them in a separate table. The date and time of each record is contained within a bracket.

E.g.
ES~1~1412179200(Oct 02 00:00:00 2014)~1~ITM_W64MQMONITORLOG00~
0~0~ES~1~1412179203(Oct 02 00:00:03 2014)~1~ITM_Log_Entries~
0~0~ES~1~1412179204(Oct 02 00:00:04 2014)~1~ITM_Log_Entries~

As you can see, the number of characters of each record are different, so I am unable to do the Left$ count thingy.

Is there any other way to do it? I only need the date and time contained in the brackets.

View 2 Replies View Related

Queries :: Text Box Values Used In Query Contain Brackets

Sep 3, 2013

I have a query which uses values in two hidden text boxes, in order to populate a sub form.Unfortunately some times the data in the text box contains brackets within it as follows:

'120/60 ZR17 (55W)'

When this occurs the query returns no data, even though records with a matching code exists in the table I am working with where Speed is 'FR'.

Code:
WHERE (((stockdyn.SPEED)="FR") AND ((stockdyn.DESCRIPN) Like '*' & [forms]![frmSearch]![Text10] & '*'))

How can I get around this, as surely if I used quote marks it would take "[forms]![frmSearch]![Text10]" as the value I am searching for.

View 3 Replies View Related

Queries :: Wild Card Searches With Brackets

Jun 26, 2014

I want to prompt the user to enter a merchant name, but want the results to return close matches.I know how to use the wildcard in the Criteria field of the query, but I want to use brackets.I know that "*Southwest*" Will return Southwest Airlines.So I tried *[Southwest Airlines]* and it treats the criteria like a text string.

View 1 Replies View Related

Modules & VBA :: Printing Code Slowing Down Printing Reports?

Feb 25, 2014

I was having trouble just setting each report with a particular print method - for some reason they just kept forgetting their individual settings and resorting to default on the machine.

This meant reports were printing on the wrong paper, or the wrong size paper, the wrong orientation and some times refusing to print if it couldn't find the paper (which is useful in runtime as it doesn't display error messages)

So I used Reports(rpt).printer properties (I forgot where I found this) to hard code the printer properties into each print command... this meant I had to use another function to insert the variables.

So all I had to do was say:

Code:
PrintMe("Invoice","InvoiceID",iID)

and a report would print to exactly how I wanted... but it's just too slow!

See attached for full code, I have a niggling feeling it may be the function: PrinterOK, to make sure the printer exists or not.

Code:
Function PrinterOK(sPrinterName As String) As Boolean
Dim MyPrinter As Printer
PrinterOK = False
For Each MyPrinter In Printers
If MyPrinter.DeviceName = sPrinterName Then
PrinterOK = True
Exit Function
End If
Next
End Function

I know it's the printing code, because if I stop the printing and just preview then it shows up almost instantly.

View 1 Replies View Related

Sort Negative First

Jan 15, 2007

When i sort values, for some reason the negatives are at the top, followed by the highest positive values. Anyway to turn this off?
Tried google and searching these forums.

View 5 Replies View Related

Negative Autonumbers

Jan 3, 2005

I trying to create a table where the primary key is a customerID, using the autonumber function. I would like to leave the new value setting on Random, since two people may be using database. However, I'm getting a lot of negative numbers as CustomerID's. If there a way I can limit the pool of random numbers to positive only.

View 4 Replies View Related

Autonumber Goes Negative?

Jan 31, 2008

I have become the default Access expert in my office... which means I know next to nothing, but more than any one else here. We have just converted an Access 2.0 (yes, really) db to Access 2000 db. It seems to function fine in most regards (all that we've tested so far) except that one autonumber in a table now gives negative numbers. It started at the same number as previously (let's say 433199), but has added a - and started counting back towards zero (-433199, -433198, etc.).

The chances of these unique numbers overlapping is slim, but I am concerned about how the negative numbers will effect other aspects of the db or our accounting system which use those distinct numbers as invoice numbers.

I would like to start at a new, positive number, but just don't know how!

View 3 Replies View Related

Negative Sums

Jul 17, 2007

I'll see if I can make this clear and concise.

I basically want to sum totals(or rather subtract totals) from groups in a report. The problem is that all my numbers are positive and need a way if possible to change some to negatives.

I have 3 categories set up e.g

Account Payable , Accounts Receivable and Non-Revenue

In the form used for input , there is a drop down box in which you select 1 of the three account types. There is second box in which you input the amount (always positive). This second box is common to all account types therefore no matter the account you input the dollar values into this second box.

Right now the report is summing all values in the group so that it's not subtracting account payable amounts from account receivable amounts...Any help would be appreciated, and hopefully it will be a simple solution. NOTE: i would like to stay away from writing or editing any code. Thanks in advance

View 3 Replies View Related







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