PerfectlyCheersJim
(1)
INV
(1)

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

Try this:Me.

Jim Evans replied to plisvb via AccessMonster.com
12-Nov-09 12:03 PM
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

Thanks Jim,This worked perfectlyCheersJim Evans wrote:--Message posted via

plisvb via AccessMonster.com replied to Jim Evans
12-Nov-09 01:19 PM
Thanks Jim,

This worked perfectly

Cheers


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-modules/200911/1
Post Question To EggHeadCafe