Form Name

DBFIN

Registered User.
Local time
Today, 17:40
Joined
May 10, 2007
Messages
205
Is there a way to increase the maximum characters allowed in an expression of a macro setvalue action ?

I have an expression in a macro setvalue action that adds multiple form textbox values. I need to change the form name from "RATING ENGINE 2" to "E RATING ENGINE 2". When I do this, I exceed the maximum characters allowed in the expression. Is there a way I can rename "RATING ENGINE 2" without this problem. The expression is as follows:

[Forms]![RATING ENGINE 2]![Excess Liab Premium 6]+[Forms]![RATING ENGINE 2]![Excess Liab Premium 7]+[Forms]![RATING ENGINE 2]![Excess Liab Premium 8]+[Forms]![RATING ENGINE 2]![Excess Liab Premium 9]+[Forms]![RATING ENGINE 2]![Excess Liab Premium 10]

As always, your help is greatly appreciated.
 
Last edited:
Hello DBFIN, could the same not be achieved by VBA? Which would solve your problem pretty easily?
 
I've tried converting my macro to a visual basic module and changing the form name with the edit replace function. I can do this very easily. My command button event runs the original macro name before it was converted to VB. How can I correct the command button so it references the converted module name. The name of the original macro is "Rating". The name of the converted module is "Converted Macro - Rating". I need the command button to run "Converted Macro - Rating".
 
In the Design view of the Form, Click on the button that performs this calculation.. Then in the events tab, Look for On Click.. It would have the Macro, Change it to [Event Procedure] or delete whatever is in there and follow the steps..

attachment.php
 
This is definitely a fantastic solution, but I'm having trouble. Here's what I did. Entered button in design view, found on click event, deleted [Embedded Macro], replaced with [Event Procedure], clicked three dots, entered VBA, deleted all the code, entered the following code.

Private Sub Command0_Click()

End Sub

After saving this it fired up a VBA version of my macro which I could edit. I somehow mistakenly lost this version of the button. I redid the button, but nothing happens after I delete and enter the code.
 
No no no.. Do not delete the code.. Just change it from Embedded Macro to Event Procedure.. On Click will call whatever is in the list..
 
I recreated the button, added the last two lines of the code, saved, but the macro does not come up in VBA. The button is called command 61.

Option Compare Database
Private Sub Command61_Click()
End Sub
Private Sub Command0_Click()
End Sub

Thanks for your patience, I'm trying very hard to get this right.
 

Users who are viewing this thread

Back
Top Bottom