N Number11 Member Local time Today, 04:41 Joined Jan 29, 2020 Messages 623 Feb 11, 2022 #1 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
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 Yesterday, 23:41 Joined Apr 9, 2015 Messages 4,354 Feb 11, 2022 #2 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]
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, 04:41 Joined Sep 21, 2011 Messages 16,973 Feb 11, 2022 #3 CorrectNumber:IIF(Len(InvoiceNo) < 6, "2000" & InvoiceNo,InvoiceNo)