Code Running At Design Time

  • Thread starter Thread starter Allen Browne
  • Start date Start date
A

Allen Browne

Can you provide more detail of what is executing?
Is this the Timer event of a form, or what?
 
Hello All

I Use Access XP For Developng A Software But I Observe That When You Are
Changing The Form Controls In THe Design View And Try To Save, The Compiler
Will Execute Some Codes While Saving The Project.

Does Any One Konw How Can I Prevent That Operation

Thanks To All
 
I can't reproduce this.

I tried on a Customer form, with a StateID field that has a RowSource of:
SELECT ltState.StateID, TestMe([StateID]) AS Result
FROM ltState ORDER BY ltState.SortOrder;
where the TestMe() function looks like this:
Function TestMe(varID As Variant)
Debug.Print "TestMe() executed at " & Now()
TestMe = varID & " again"
End Function

Nothing showed up in the Immediate Window when I open or close it in design
view.
 
Dear Allen

It Is Not A Timer But I Use A Combo Box With A Row Source Containig A
Function That I Build n A Module So When I Change Any Thing In THe Form At
Design View And Try To Save The Combiler Execute This Function Without
Running The Program Just i Save The Changes I Made To The Form Without Any
Run Command

Look Forward To Get Your Reply
And Thank You For Your Kindness

Yours Fathefully Rabea Khalil
 
Dear Allen

Thank You For Your Concern I Will Test It Again To Specify When The problem
Occure And i Will Reply You , But Please I Have An Other Question That No
Body Rply Me So If You Can Help Me,

I Want To Change The Scroll Bar Align For A Combo Box From Left To Right And
From Right To Left According To An Option Becuase The Application I Build
Deals With Arabic Language (So Every Control Alignment Must Be Right To
Left) And English Language (So Every Control Alignment Must be Left To
Right), To Do This At Run Time But It Doesnt Worked For The Combo Box.

So Can You Please Help Me

THank You Agian
Rabea Khalil
 
Dear Allen

For The FIrst Problem Try THis Code In The Function

Function TestMe(varID As Variant)
msgbox "TestMe() executed at "
End Function

You Will Find That The Combiler Will Execute The Code On Saving
Note I Am Using Access XP

Thanks Again
 
Dear Allen

Thank You For Your Concern I Will Test It Again To Specify When The
problem Occure And i Will Reply You , But Please I Have An Other Question
That No Body Rply Me So If You Can Help Me,

I Want To Change The Scroll Bar Align For A Combo Box From Left To Right
And From Right To Left According To An Option Becuase The Application I
Build Deals With Arabic Language (So Every Control Alignment Must Be Right
To Left) And English Language (So Every Control Alignment Must be Left To
Right), To Do This At Run Time But It Doesnt Worked For The Combo Box.

So Can You Please Help Me

THank You Agian
Rabea Khalil

I just tested this in A2003 and it worked fine. I could toggle the scrollbar
L or R on a button click. Have you tried setting your form's Orientation
property to "right to left"? Which Access version are you using?
 
Stuart McCall said:
I just tested this in A2003 and it worked fine. I could toggle the
scrollbar L or R on a button click. Have you tried setting your form's
Orientation property to "right to left"? Which Access version are you
using?

I notice from your other post that you are using Access XP. I've just run
some tests and I cannot get the combo to change it's scrollbar alignment at
runtime. This is something MS seem to have fixed in A2003.

One workaround for this would be to have 2 combo boxes, one set L to R and
the other set R to L, then make one visible and the other hidden at runtime.
Any code which refers to the existing combo will have to take this change
into account, of course. Not ideal, but it should work ok.
 
Back
Top