Home

Left function in a calculated column

%3CLINGO-SUB%20id%3D%22lingo-sub-938911%22%20slang%3D%22en-US%22%3ELeft%20function%20in%20a%20calculated%20column%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-938911%22%20slang%3D%22en-US%22%3E%3CP%3EI'm%20trying%20to%20use%20the%20Left%20function%20to%20copy%20the%20first%20character%20of%20a%20column%20into%20a%20new%20column.%3C%2FP%3E%3CP%3EIn%20design%20view%20I%20add%20a%20new%20column%20to%20the%20table%2C%20and%20select%20calculated%2C%20which%20brings%20up%20the%20expression%20builder%20where%20I%20enter%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ELeft(%20%5Bladnm%5D%20%2C%201%20)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Eladnm%20in%20the%20name%20of%20the%20column%20im%20trying%20to%20extract%20the%20first%20character%20from%2C%20hence%201.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EInitially%20I%20was%20getting%20the%20error%20message%20'%3CSPAN%3ECannot%20change%20a%20rule%20while%20the%20rules%20for%20this%20table%20are%20in%20use'%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EBut%20I%20have%20been%20messing%20about%20with%20it%20for%20so%20long%2C%20its%20now%20givng%20me%20the%20error%20'Filesharing%20lock%20count%20exceeded.%20Increase%20MaxLocksPerFile%20registry%20entry'%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EStarted%20looking%20this%20up%20and%20found%20myself%20in%20regedit%20-%20seems%20excessive%20for%20the%20problem%20I%20started%20with....%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECan%20anyone%20help%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-938911%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAccess%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-945776%22%20slang%3D%22en-US%22%3ERe%3A%20Left%20function%20in%20a%20calculated%20column%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-945776%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F307682%22%20target%3D%22_blank%22%3E%40Stumac%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIf%20you%20want%20to%20do%20it%20you%20will%20need%20to%20do%20it%20in%20a%20query%20or%20in%20a%20form%20based%20on%20this%20table.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EExample%3A%3C%2FP%3E%3CP%3EInitialsSearch%3A%20Left(%5BFirstName%5D%2C1)%20%26amp%3B%20%22.%22%20%26amp%3B%20Left(%5BLastName%5D%2C1)%20%26amp%3B%20%22.%22%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIf%20you%20add%20this%20as%20a%20collumn%20in%20a%20query%20it%20works%20good.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIn%20a%20form%20you%20can%20connect%20to%20the%20event%20afterupdate%20from%20the%20column%20where%20the%20information%20was%20entered.%26nbsp%3B%20In%20my%20example%20it%20looks%20like%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EPrivate%20Sub%20LastName_AfterUpdate()%3CBR%20%2F%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20Me.Initials%20%3D%20Left(Me.FirstName.Value%2C%201)%3CBR%20%2F%3EEnd%20Sub%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EGreetings%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EMarcel%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Stumac
New Contributor

I'm trying to use the Left function to copy the first character of a column into a new column.

In design view I add a new column to the table, and select calculated, which brings up the expression builder where I enter 

 

Left( [ladnm] , 1 )

 

ladnm in the name of the column im trying to extract the first character from, hence 1.

 

Initially I was getting the error message 'Cannot change a rule while the rules for this table are in use'

But I have been messing about with it for so long, its now givng me the error 'Filesharing lock count exceeded. Increase MaxLocksPerFile registry entry' 

 

Started looking this up and found myself in regedit - seems excessive for the problem I started with....

 

Can anyone help?

1 Reply

@Stumac 

If you want to do it you will need to do it in a query or in a form based on this table.

 

Example:

InitialsSearch: Left([FirstName],1) & "." & Left([LastName],1) & "."

 

If you add this as a collumn in a query it works good. 

 

In a form you can connect to the event afterupdate from the column where the information was entered.  In my example it looks like:

 

Private Sub LastName_AfterUpdate()
              Me.Initials = Left(Me.FirstName.Value, 1)
End Sub

 

 

 

Greetings,

 

Marcel

 

 

Related Conversations
Tabs and Dark Mode
cjc2112 in Discussions on
46 Replies
Extentions Synchronization
Deleted in Discussions on
3 Replies
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies
flashing a white screen while open new tab
Deleted in Discussions on
14 Replies
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
29 Replies
Security Community Webinars
Valon_Kolica in Security, Privacy & Compliance on
13 Replies