Solved Add Prix to field (1 Viewer)

Number11

Member
Local time
Today, 07:45
Joined
Jan 29, 2020
Messages
607
So i need to add this to any numbers that are only 5 string long

CorrectNumber:"2000" & [InvoiceNo]

but i only want to correct if the current number is less than 6 ?

how would i go about this please
 

Ranman256

Well-known member
Local time
Today, 02:45
Joined
Apr 9, 2015
Messages
4,337
in a select query , 2 fields: bring down [invoiceNo] and make another fld: Len([invoiceNo])
in its criteria, set it to: <6
view the results,

now convert it to an UPDATE query,
change [invoiceNo] to: "2000" & [InvoiceNo]
 

Gasman

Enthusiastic Amateur
Local time
Today, 07:45
Joined
Sep 21, 2011
Messages
14,265
CorrectNumber:IIF(Len(InvoiceNo) < 6, "2000" & InvoiceNo,InvoiceNo)
 

Users who are viewing this thread

Top Bottom