Problem with UCase macro.

Charlie

Board Regular
Joined
Mar 1, 2002
Messages
134
I have been trying to assign a macro to a text box on a form, I have been trying to assign it to the After Update property.
The macro I have been trying to use looks like this:
Set Value

Item:[Forms]![frmTenants]![Credit_Ref#]

Expression: UCase([Forms]![frmTenants]![Credit_Ref#])

This works up to a point it does convert the code I enter to uppercase but I get an error message stating MSAccess will not allow me to save the record at this time.

What am I doing wrong?


Charlie
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
I can't exactly say what's wrong with your code, but this simple procedure should accomplish what you want:

Code:
Private Sub YourControl_AfterUpdate()
Me.YourControl=UCase(Me.YourControl)
End Sub
 
Upvote 0
I know what was wrong

I had the macro assigned to the after update property of the whole form instead of the text box, thanks for the code Ill try and remember that one.


Charlie
 
Upvote 0

Forum statistics

Threads
1,223,442
Messages
6,172,146
Members
452,445
Latest member
walkman99

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top