By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,441 Members | 998 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,441 IT Pros & Developers. It's quick & easy.

Text box Position on form

P: n/a
I'd like to change the top margin of a text box based on a State Field.

So if the state is LA I want the box to appear 1" from the top, if it's
CA I want it to appear 2" from the top.

If State = "LA" Then
lablename.Move
Top:=1
End If
Nov 13 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
On 15 Sep 2004 07:56:08 -0700, mar10a wrote:
I'd like to change the top margin of a text box based on a State Field.

So if the state is LA I want the box to appear 1" from the top, if it's
CA I want it to appear 2" from the top.

If State = "LA" Then
lablename.Move
Top:=1
End If


In the Form's Current event and in the State control's AfterUpdate
event:
If Me![State] = "LA" then
Me![ControlName].Top = 1 * 1440
ElseIf Me![State] = "CA" Then
Me![ControlName].Top = 2 * 1440
Else
Me![ControlName].Top = ? * 1440
End If

All measurements are in Twips, 1440 per inch.

--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
Nov 13 '05 #2

P: n/a
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

How's about:

dim intTop as integer
select case State
case "LA": intTop = 1
case "CA": intTop = 2
end select
Me!text_box_name.Top = intTop

--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBQUhsEIechKqOuFEgEQKdjACgrVlzDDsU1ONUyaFwMTl9qY dYaDQAn16w
rcj46WbhrR5ARxQI0l4cEw6U
=Oq4o
-----END PGP SIGNATURE-----
mar10a wrote:
I'd like to change the top margin of a text box based on a State Field.

So if the state is LA I want the box to appear 1" from the top, if it's
CA I want it to appear 2" from the top.

If State = "LA" Then
lablename.Move
Top:=1
End If


Nov 13 '05 #3

P: n/a
Try lablename.top = 1440

(I think 1440 = 1 inch. position messured in twips not inches)

mar10a wrote:
I'd like to change the top margin of a text box based on a State Field.

So if the state is LA I want the box to appear 1" from the top, if it's
CA I want it to appear 2" from the top.

If State = "LA" Then
lablename.Move
Top:=1
End If

Nov 13 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.