Multiplication Expression

Oct 25, 2006

OK, I should be able to figure this out, but I'm getting frustrated... I also haven't been able to find the answer via the search feature or MS help, so I'd be overly appreciative if someone could slap some sense in me with an answer to this.

All I am trying to do is write an IF expression in "Text9" that resides in a subform (that feeds a table) that will multiply the value typed in the "MatQuan" text box by a specified amount. (Example below)


Private Sub LocQuan_AfterUpdate()

If Forms![frmEntry]![PartNumber] = "1A4595" And Me.Location = "Vane ID" Then
Me.Text9 = ((LocQuan.Value) * (0.021))
End Sub

I know it's recognizing the specified part number in the master form because I tested it using different instructions. When I type the line that is supposed to do the multiplication as I think it actually should be, I get an error. As seen above, it does nothing at all. I've tried many different variations with either a debug error or lack of results.

Could someone please show me how to properly write this darned expression?
Thanks in advance!
Yours in stupidity,
Ceejay (currently wearing a dunce cap)

View Replies


ADVERTISEMENT

Queries :: Tables With Inventory Items And Storage Charges Per Day - Multiplication Expression

Mar 13, 2014

I have a table with inventory items, a separate table with storage charges per day (ex .03, .04, .05 per day/per item)

I have created some queries where I take the items & # of days they have been in storage and when I try and create an expression for storage charges based upon QTY & # of days I am getting results like it is multiplying whole numbers and not very small increments like .03

I have checked the math, and its not multiplying by 3 instead of .03... I cant quite figure out how it is coming up with the numbers.

Again, the pricing is coming from a lookup wizard to another table. It seems like it should be a very straight forward expression but I cannot get it to work. Does the figures being from a lookup have any issues?

View 6 Replies View Related

IF Statement And Multiplication

Jul 11, 2005

Hi
I need help creating a calculated field. I'm not sure how to write the IF statement.
Calculated Field Name: Special_Rate
Data Field Name: phrearn_earn_code
Bascially....
If phrearn_earn_code = OT1, then I need to Multiply OT1 * .5 for a total.

Thanks

View 7 Replies View Related

Iif Iserror With Multiplication

Nov 8, 2006

I'm trying to create an expression field in my query that multiplies 2 fields that are in the query. Here is the code I'm using...

NTA#: IIf(IsError([HeaderProductionQuantity]*[NTA]),0,[HeaderProductionQuantity]*[NTA])

The quantity field has the amount of pieces that we produced in a given day. The NTA field is a number 1-4 and blank that show the amount of pieces that require the NTA job.

As long as there is a number in the nta field, I get a good calculation. If the nta field is blank, I get #error in the query. What is wrong with the above formula that it isn't replacing the #error with 0?

If I put the 0 at the end of the formula, it replaces the good calcs with 0,so the formula is correct, correct?

View 5 Replies View Related

Multiplication In Form

May 20, 2005

Please, help!

I have the projects profile form and would like access to calculate some values automatically, when I enter certain data for each project.
I enter "Forecast" and "Probability"
The result has to be X=Forecsst*Probability

I write in the options of text filed for the result the following

=Summ([Forecast]*[Probability])

and he calculates it only for one form, but not for others. In other forms the summ stays the same or changes to something absolutely random. Why?? What should I write to proceed these stupid multiplication? :confused:

Thank you!!!

View 1 Replies View Related

Query Multiplication Problem.

Nov 27, 2007

Hi Folks.

I have a question about query. There is two field in query.Total and Currency. I'd like to multiplication total and currency filelds.I so thing do in query. if currency field is empty , write total to the GTotal.if you help to me I would be very glad.

Thank you

For Example
GTotal:[Total]*[Currency] it is very good working. but I don't want this calculation
GTotal:iif([Currency]is not null;[Total]*[Currency] or iif([Currency] is null; [Total]) it is not working. Query result : -1 :confused:

Total Currency GTotal
10 * 1.2 = 12
20 * = 20 like.....

View 4 Replies View Related

Modules & VBA :: Multiplication With Str Function

May 6, 2015

I got the following problem.

This code doesn't calculate the exact value:

Code:

Sub TEST()
Dim strSQL As String
Dim b As Double
DoCmd.SetWarnings False
b = DLookup("MC", "COMMON_DISTRIBUTION", "YEAR = 2015")

[Code] ....

My variable b is 0.230.
The TNS is multiplied with 0.228.
It seems a problem with the Str(b).

View 5 Replies View Related

Writing An Expression In The Expression Builder

Jun 8, 2005

Good day all

Heres what im trying to do:

in one textfield i have =Count(*)

this returns all the records in my db.

now i want to split it up. i want to count all the records for each month.
my field name is datein_now but its just a normal textfield and not a date field.
example in field: 05/02/02 10:24:31 AM.
also got a datein textfield:05/02/02
i had
Count(*) where datein_now between 05/05/01 and 05/05/31

please help

lee

View 1 Replies View Related

Expression Help

Mar 15, 2006

Hi:

I'm using this expression...

=DateDiff("ww",#8/26/2005#,[cDate])

I want to add to it the ability to exclude five one week periods which are school vacations.

How can I do that?

Thanks,

xeb

View 1 Replies View Related

Expression Help

Oct 22, 2006

PART NUMBER: IIf([MANUFACTOR SENT]=2,[GE PART #])OR IIf([MANUFACTOR SENT]=3,[PHILLIPS PART #])OR IIf([MANUFACTOR SENT]=1,[SYLVANIA PART #])

CAN ANYONE HELP ME FIX THIS EXPRESSION

View 1 Replies View Related

Help With Expression

Jun 11, 2007

I have got the following code as an expression for a report:

=Int(([Amount])/50000)*50000 & " - " & Int((([Amount])/50000)+1)*50000

How do I get it to pick figures greater than 50,000 and then figures greater than 100,000 plus?

View 3 Replies View Related

Any Help With This Expression?

Jun 25, 2007

I need help setting up an expression. I need to set the default value = date + 2. But this also needs to take into account working days. I am just having problems with the syntax for this, as i would normally do this in VBA and do not have much experience with Expression Builder. And yes it does have to be done in Expression Builder.

I know this is horribly wrong... thats why I am asking for help.
IIf ((WeekDay(DateAdd ("d", 2, Date)) = 1, (DateAdd("d", 3, Date)),(DateAdd("d", 2, Date))) OR IIf (WeekDay(DateAdd ("d", 2, Date)) = 7, (DateAdd("d", 4, Date)),(DateAdd("d", 2, Date))) OR IIf (WeekDay(DateAdd ("d", 2, Date)) < 7 AND IIf (WeekDay(DateAdd ("d", 2, Date)) > 1, (DateAdd ("d", 2, Date),(DateAdd("d", 2, Date)))

I need 3 If statements:
1 for if its Saterday
1 for if its Sunday
1 for if its neither.

In VBA I would do something like this:
If WeekDay(DateAdd ("d", 2. Date)) = 1 Then Box = Date() + 3
If WeekDay(DateAdd ("d", 2. Date)) = 2 Then Box = Date() + 4
If WeekDay(DateAdd ("d", 2. Date)) > 1 And WeekDay(DateAdd ("d", 2. Date)) < 7 Then Box = Date() + 2

Please any assistance would be appreciated

View 6 Replies View Related

Expression Help

Feb 11, 2008

Hi All,

could i get some advise on an expression i need in a query?

i have 5 fields
SumMats,SumLabs,MatsDed,LabsDed,Ttreat

i need another field that will give a value on a condition. the condition is that if LabsDed isNull, MatsDed will be divided by Ttreat otherwise LabsDed will be divided instead. can this be done? if so, how could i do it?

many thanks,


Nigel

View 1 Replies View Related

Expression Help

Jun 14, 2006

I need an expression for a table. I'm making a game database and for the ID input I need an expression.

For example if have a XBOX game I want the ID to be X1 or X2 etc, same goes for pc games, GameCube games: PC1 or PC2, NGC1 or NGC92 etc.

I thougt it would be "X???" Or "PC???", but that doesn't work.
Does someone knows?

Please help.

View 4 Replies View Related

IIF Expression

Jan 9, 2007

Okay

Maybe i am totally confused but here is initially what i have and what i want to do.

I currently have a db for carrer development-- i have three fields

Last Review Date
Next Discussion Due
Status

My next discussion due is on the fly-- i did a dateadd (by one year) from the last review date to get the current result for the next disussion due--

here is what i want to do with the status and am confused with how to do it--
i want the status to have three options-- completed,overdue and upcoming--
i want these to be autogenerated but am unable to find what expression i need-- as the IIf expression only gives the option of two possible results--

so how would i go about doing the expression with having three possible outcomes?

View 6 Replies View Related

IIF Expression

Nov 10, 2005

I am trying to execute a query that calculates a retail pricing off the whsl pricing. This is the excel calculation i use: =IF(F2<10,(SUM(F2*4)),(SUM(F2*2))). I changed the IF to IIF, and replaced "F2" with "[WHSL PRICE].

However, I am getting an error that the "category" expression is not included in the function (when I have all the fields in the query) or the function if I have just the field I am trying to calculate in the query. Can somone help me understand what I am doing wrong.

I would also like this calculation to save in the table, if possible. As I use this information to update my fields in my web database.


Best Regards,

Irish

View 11 Replies View Related

Expression HELP!!

Mar 1, 2006

Ok, I have a query that has a range of number for 1 - 126, I need and an expression that will flag sub-ranges in the list of numbers.

Example I want to group or flag results 0-25 as one group, 26-50 as another, 50 - 75 and 76 -100.

Any ideas? I statred with an IF than expression, but I can't figure how to indicate each range.

thanks
-pete

View 1 Replies View Related

Expression Sum IIf

Mar 3, 2006

;) I want to create a field named ErrorCases that sums the rows meeting the following conditions: The row has a ValidityReason = 2 and for the same row ExpValidity is either null or 3. I want a count of the rows meeting these condtions.

Here is the formula I have constructed that does not work.

ErrorCases: Sum(IIf(([ValidityReason]="2" And [ExpValidity] Is Null) Or ([ValidityReason]="2" And [ExpValidity]="3"),1,0))

Any suggestions?

View 2 Replies View Related

IIf Expression

Jun 1, 2006

I having some trouble trying to use an expression in my query,
I have 3 indivisual exoressions in 3 fields I which work perfectly, however I want only 1 field produced so I tried placing 1 after the other as below:

Sector: IIf([SpacePos]=3,Left([PostalCode],[SpacePos]) & Mid([PostalCode],[SpacePos]+1,1)),IIf([SpacePos]=4,Left([PostalCode],[SpacePos])+"" & Mid([PostalCode],[SpacePos]+1,1)),IIf([SpacePos]=5,Left([PostalCode],[SpacePos]-1) & Mid([PostalCode],[SpacePos]+1,1))

I have also tried Or inbetween them but no luck either, I get the "contains invalid syntax" errors etc.
Any advise appricated

View 2 Replies View Related

Expression

Jun 23, 2006

How can i write an expression in a query field that will return the following text; "A","B","C","P" and "F" Base on another field when the values of that field are <=44.44, between 44.45 and 54.44, Between 54.45 and 64.44, Between 64.45 and 74.44 and above 74.45 respectively?

View 2 Replies View Related

Fix The Expression

Jul 20, 2006

How do I fix this to specify each table
Description: [level] & " " & [room] & " " & IIf(IsNull([direction]),[location],[direction] & " " & [location] & " " & [fixture] & " " & [note])


Description: [level] [level table] & " " & [room] [room table] DOESNT WORK

HELP

View 1 Replies View Related

Expression Help

Oct 22, 2006

LETS SAY I HAVE THREE PART NUMBERS FOR DIFFERENT MANUFACTORS. IF THE USER SELECTS GE MANUFACTOR THEN THE GE PART NUMBER SHOULD BE LISTED IN PART NUMBER. I GET ERRORS WITH THIS EXPRESSION IN MY QUERRY

Expr1: IIf([MANUFACTOR SENT]="GENERAL ELECTRIC",[PART NUMBER]=[GE PART #])


HELP

View 4 Replies View Related

More Expression Help

Oct 22, 2006

IIf([MANUFACTOR SENT]=2,[GE PART #])

this expression works fine in my querry....but i need to add to it...if the user doesnt choose 2...if he chooses 1 then i need the sylvania part number or if he chooses 3 i need the phiilips part number....so i used this expression

IIf([MANUFACTOR SENT]=2,[GE PART #])IIf([MANUFACTOR SENT]=1,[sylvania PART #])IIf([MANUFACTOR SENT]=3,[phillips PART #])

but i get errors....how do you you string the expression...or what should i do to fix

View 1 Replies View Related

Is There A Possible Expression

Feb 3, 2007

I was hoping that someone could at least tell me if this is possible.

I have a table that (among other fields) has an integer field (call it X) and a date field call it Y).

I was hoping that I could create a query that captured these two fields (no problem), but also included a third, build expression field.

This latter field is supposed to be a sum of the previous X-values up until the current record date Y-value.

Ex:

If I have the following info

X Y

1 jan-3-07
3 jan-5-07
23 jan-5-07
12 jan-19-07


Then the query would be built so that the results would look like one of the following

X Y Z OR Y Z

1 jan-3-07 1 jan-3-07 1
3 jan-5-07 4 jan-5-07 27
23 jan-5-07 27
12 jan-19-07 39 jan-19-07 39



I can't seem to be able to build the right expression to achieve this. I can easily code this through a form using VB, but I assume it is equally possible through just a query.

I would be grateful for any and all help people can provide,

-arm

View 4 Replies View Related

Expression Help

Mar 14, 2007

I am trying to write an expression that will compare names in a field to see if they are the same. then as long as the name is the same i need a field to add another field and then subtract yet another field but if there is nothing in the subtract field then i just want the answer of the two added fields.

View 5 Replies View Related

I Need An Help With A Expression.

Dec 6, 2007

Hello,

I need a help with an expression basically I have a date taken out field and I need to find out how long a video has been taken out for since the day taken out :confused: I need it to create a new field in the query and display how many days it has been taken out.

Thanks in advance

Simon Tickner.:)

View 4 Replies View Related







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