DataBase - Nz Question
Asked By plisvb via AccessMonster.com
12-Nov-09 10:04 AM
Hello all,
My formula works perfectly so far:
Me.inv = Nz(DCount("[OrderID]", "Orders", "[Transaction Type]=2"), 0) + 1
It returns a number that is exactly what I want. However, I am not sure how
to concatenate a prefix onto the value.
Instead of 126 I want the value to be INV-126
Thanks in advance
--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-modules/200911/1
PerfectlyCheersJim
(1)
INV
(1)
Jim Evans replied to plisvb via AccessMonster.com
Try this:
Me.inv = "INV-" & Nz(DCount("[OrderID]", "Orders", "[Transaction Type]=2"),
0) + 1
If you intend saving this entire value, make certain that the field in the
table will accept a String, otherwise you will get an error when your record
is updated.
--
Jim
plisvb via AccessMonster.com replied to Jim Evans
Thanks Jim,
This worked perfectly
Cheers
--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-modules/200911/1
de mon code avec les explications et ce que j'aimerais arriver a faire: * ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** Set Inv = Dbs.OpenRecordset("SELECT * FROM InvTampon") Inv.MoveFirst Do Until Inv.EOF pi = 1 For pi = 1 To 12 Inv.Edit (le recordset contient les champs 1 a 12 et un chanps Inv Inv![Inv] = Inv![Inv] + Inv![pi] (résultat désiré: Inv![Inv] = Inv![Inv] + Inv![1], Inv![Inv
this db from scratch, and now I need some help. This is my sql: SELECT INV.MFG, INV.CONDITION, ALTERNATE.ALT, INV.DESCRIPTION, INV.QTY, INV.LOCATION FROM INV INNER JOIN ALTERNATE ON INV.[P / N] = ALTERNATE.[P / N] WHERE (((INV.QTY)> 0)) ORDER BY INV.MFG; The INV table contains information such as autonumber id
in the where section of the sql yet i cant determine what is wrong SELECT Inv.OrderDate, Customers.CompanyName, Inv.InvoiceNum, [Service Details].OrderID, Inv.OrderDate, Inv.InvDate, Inv.InvoiceNum, Customers.FROMCC, Customers.BVRACCT, Customers.RECLASSTOACCT, Customers.RECLASSTOCC, Customers.Country, [Service Details].Cost, Customers TYPE, 1 As SortOrder FROM Service INNER JOIN ((Customers INNER JOIN Inv ON Customers.CustomerID = Inv.CustomerID) INNER JOIN [Service Details] ON Inv.InvID = [Service Details].OrderID) ON Service.SERVICEID = [Service Details].ServiceID GROUP BY Inv.OrderDate, Customers
Access 2007. I have a table with 4 columns: Date Mailed, 2nd, C w / o Inv, and C w / Inv. I can get the monthly totals by grouping on Date Mailed and each individual column Is there a way to combine the totals for 2nd, C w / o Inv and C w / Inv that are Yes / No boxes into One column? I use the following for each individual Access Queries Discussions Access 2007 (1) Grouping (1) Marilyn Myers (1) Abs (1) Sum (1) Inv (1) YesCountAll: Abs(Sum([2nd] + [C w / o Inv] + [C w / Inv])) - - Build a little, test a little. Marilyn - I think you want this: = Sum(Abs([2nd Abs([C w / o Inv]) + Abs([C w / Inv])) - - Daryl S keywords: Count, Yes / No, for, three, fields, in, one