473,408 Members | 2,832 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

move from top of page

Can anyone tell my why this isn't working?

Me![dt].top=(1440/2.54)*16.78-[DT Total]*0.4)

I want it so that for every 1 change in [DT Total], a rectangular box [dt]
moves 0.4 units closer to the top.

The 1440/2.54 changes the pixel measurment into cm then the box is moved to a
specific starting point when it is multiplied by 16.78.

Anyways, the numbers are correct for my use, but when [DT Total] changes, the
box dosen't move. It seems like if I try and use + or - it doesn't recognize
it.
Any ideas?
Thanks

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...ccess/200804/1

Apr 10 '08 #1
2 2117
Hi,

What your equation evaluates to is: Me![dt].top =
((1440/2.54)*16.78) - ([DT Total]*0.4))

As I understand your comment the first part of the arithmetic,
((1440/2.54)*16.78) is in units of centimeters.

What is the unit of measure for ([DT Total]*0.4))?

Kevin

"noe1818 via AccessMonster.com" <u39419@uwewrote in message
news:827bd9bf67f9b@uwe...
Can anyone tell my why this isn't working?

Me![dt].top=(1440/2.54)*16.78-[DT Total]*0.4)

I want it so that for every 1 change in [DT Total], a rectangular box [dt]
moves 0.4 units closer to the top.

The 1440/2.54 changes the pixel measurment into cm then the box is moved
to a
specific starting point when it is multiplied by 16.78.

Anyways, the numbers are correct for my use, but when [DT Total] changes,
the
box dosen't move. It seems like if I try and use + or - it doesn't
recognize
it.
Any ideas?
Thanks

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...ccess/200804/1

Apr 11 '08 #2
noe1818 via AccessMonster.com wrote:
Can anyone tell my why this isn't working?

Me![dt].top=(1440/2.54)*16.78-[DT Total]*0.4)

I want it so that for every 1 change in [DT Total], a rectangular box [dt]
moves 0.4 units closer to the top.

The 1440/2.54 changes the pixel measurment into cm then the box is moved to a
specific starting point when it is multiplied by 16.78.

Anyways, the numbers are correct for my use, but when [DT Total] changes, the
box dosen't move. It seems like if I try and use + or - it doesn't recognize
it.
Any ideas?
Thanks
I guess this is response to your prior post.

I created a simple report with 2 textboxes in the Detail band. I named
them Text1 and Text2. The control source is ="Text1" for Text1 and
="Text2" for Text2. I then added a line item called Line1.

I figured I'd shift the text boxes up or down. I determined I'd have 10
levels. I placed Text1 higher than Text2 and entered in the OnOpen event
MsgBox "Text1 " & Me.text.Top & " Text2 " & Me.Text2.Top & _
"Diff " & Me.Text1.Top - Me.Text2.Top & _
"plus Textbox height " & Me.Text1.height
In my case, the height difference was was 45 twips. For moving up/down
10 levels the Detail band height must be at least 450 twips plus the
height of the textbox.

You mentioned earlier you wanted to connect the line between Text1 and
Text2. So here's the code for it. If you drop this code into the
report's code module it does just that.

Note: The lines
'change the 1/10 numbers to any number between 1 and 10
Me.Text1.Top = (1 * intHeightPerUnit)
Me.Text2.Top = (10 * intHeightPerUnit)
are the only lines that need to be changed. They reflect your unit
measure. Hope this helps.

Option Compare Database
Option Explicit

Dim intNumUnits As Integer
Dim intHeightPerUnit As Integer

Private Sub Report_Open(Cancel As Integer)
intNumUnits = 10 'max number of upward moves
intHeightPerUnit = 45 'twips to move upward

'determine the height of the detail band. Change
'your figures to suite your situation
Me.Detail.Height = (intNumUnits * intHeightPerUnit) + _
Me.Text1.Height
End Sub
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Dim intNum As Integer
Dim intDiff As Integer

'change the 1/10 numbers to any number between 1 and 10
Me.Text1.Top = (1 * intHeightPerUnit)
Me.Text2.Top = (10 * intHeightPerUnit)

intNum = Me.Text1.Height / 2 'put line in center of textboxes

'initialize Line1
Me.Line1.Height = 0
Me.Line1.Top = 0
Me.Line1.Left = 0

'left starting point of line
Me.Line1.Left = Me.Text1.Left + Me.Text1.Width

'length of Line1
Me.Line1.Width = Me.Text2.Left - Me.Line1.Left

'top line
If Me.Text1.Top <= Me.Text2.Top Then
Me.Line1.Top = Me.Text1.Top + intNum
Else
Me.Line1.Top = Me.Text2.Top + intNum
End If

'determine height of Line1
intDiff = Me.Text1.Top - Me.Text2.Top

'determine if line should be slanted / or \ direction
Me.Line1.LineSlant = (intDiff >= 0)

Me.Line1.Height = Abs(intDiff)

End Sub

Rolo
http://www.youtube.com/watch?v=TgvKrzh93ug




Jun 27 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: Apostolis K. | last post by:
I run windows XP and IIS 5.1 and the system doesn't let me to delete or move folders using FileSystemObject.DeleteFolder(path,force) or FileSystemObject.MoveFolder(origin,destination). I allow all...
5
by: Galina | last post by:
Hello I have an Access 2000 application. The form has got a tab with 3 pages. There are several text boxes and command buttons on one page. I need to move them to another page (to free form space...
4
by: Vincent Yang | last post by:
I'm using Access 2002. My database is in Access 2000 format. I'm designing a form to collect responses to a 40-item questionnaire. I can fit four list boxes on a screen, so I plan to have 11 tab...
8
by: moondaddy | last post by:
Is there a way to make the browser move back to the previous page via code behind on the server? The effect would be the same as the user clicking on the browser's back button. Thanks. --...
8
by: Robson Machado | last post by:
Dear friens, Does anybody knows how to move controls (images, textboxes, buttons, etc..) using CodeBehind? Regards,
7
by: tshad | last post by:
Is there a way to move a row in a Datalist up or down without having to re-read the data? I have a datalist which has embedded Datagrids in it. I want to allow the user to move a row up or down...
1
by: Phil Endecott | last post by:
Dear Postgresql experts, According to the documentation for MOVE, it returns the number of rows that it has moved over. It seems to me that this is true for MOVE FORWARD n, but not for MOVE...
10
by: Robert | last post by:
I have an app that was originally 1.1, now migrated to 2.0 and have run into some sporadic viewstate errors...usually saying the viewstate is invalid, eventvalidation failed or mac error. My web...
1
by: Patrick | last post by:
Hi, I have a xml file like this: <?xml version="1.0"?> <home> <page name="Test1" id="1"> <page name="Pagetest1" id="2" src="test1.htm"></page> <page name="pagetest3" id="3"...
5
by: DL | last post by:
Hi, My research on this NG hasn't produced a satisfactory answer. Here's what I want to do: move two div (s) (each has an image tag within) to another location on the same page. // no...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.