Form direction

emad981

Registered User.
Local time
Today, 07:18
Joined
Aug 20, 2013
Messages
17
I made my database to run into 2 languages (English - Left to Right) and (Arabic - Right to left)
Access only assigns one direction by default.
What I want is to shift the direction of the form from LTR to RTL by VBA .

How can this be done?????
 
usage:
me.caption = RevWord(me.caption)
or
txtBox = RevWord(txtBox)

Code:
public function RevWord(pvWord)
dim vNew
dim i as integer

for i =  len(pvWord) to 1 step -1
  vNew =vNew & mid(pvWord,i,1)
next
RevWord = vNew
end function
 
I'm Sorry, can you clarify more how to use this.
I put the code in the form on Load, but no change happened.
Thanks
 
First : the code is a function. You can't put it in onLoad() and expect it to work. You need to call this function and store the result in a variable.

Second : The function will convert strings from left to right (so basically reverse the string) which can be done simply with StrReverse.

What you need to do is for all the controls on your form set the TextAlign to 3 if the language is arabic else 1.
(see : https://msdn.microsoft.com/en-us/library/office/ff192081.aspx)
 
Dear All, I know I'm stupid enough
But really I can't get the meaning.

:banghead:
 
Finally I found the solution:
I just assign the .Left property of my reference as following:

Code:
Me.txtBoxName.Left = 5 * 1440

and I adjust the (5) according to my form.

Thanks
Solved
 

Users who are viewing this thread

Back
Top Bottom