473,657 Members | 2,591 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.c om
http://www.accessmonster.com/Uwe/For...ccess/200804/1

Apr 10 '08 #1
2 2133
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.c om" <u39419@uwewrot e in message
news:827bd9bf67 f9b@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.c om
http://www.accessmonster.com/Uwe/For...ccess/200804/1

Apr 11 '08 #2
noe1818 via AccessMonster.c om 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 * intHeightPerUni t)
Me.Text2.Top = (10 * intHeightPerUni t)
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 intHeightPerUni t As Integer

Private Sub Report_Open(Can cel As Integer)
intNumUnits = 10 'max number of upward moves
intHeightPerUni t = 45 'twips to move upward

'determine the height of the detail band. Change
'your figures to suite your situation
Me.Detail.Heigh t = (intNumUnits * intHeightPerUni t) + _
Me.Text1.Height
End Sub
Private Sub Detail_Format(C ancel 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 * intHeightPerUni t)
Me.Text2.Top = (10 * intHeightPerUni t)

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.LineSl ant = (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
4319
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 permitions to that web folder (Read, Right, Source Access) I notice that in Windows XP cannot uncheck the Read-Only option in any folder options. If you uncheck and press OK the next time you open the folder properties again the check box will...
5
12221
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 for another control). Is it possible to move controls from one page of a tab to another, or I'll have to re-create them? If it is possible, please could you advise, how? I have tried to move one text box. It happily vanished. Thank you. Galina
4
9515
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 pages (one page at the end for collecting identifying information) on my form. To ease the task for the user, I'd like to have an automatic movement to the next page. For instance, when the user clicks on the choice for Question 4 (the last of...
8
2097
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. -- moondaddy@nospam.com
8
4412
by: Robson Machado | last post by:
Dear friens, Does anybody knows how to move controls (images, textboxes, buttons, etc..) using CodeBehind? Regards,
7
3091
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 by just pushing a button and have the page post back with the row moved without actually re-reading the data from the database? Thanks,
1
1994
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 RELATIVE n or MOVE ABSOLUTE n when it always returns 1: db=> declare c scroll cursor for select * from p; DECLARE CURSOR db=> move absolute -1 in c;
10
3076
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 config does specify a machinekey setting: <machineKey validationKey="447C05E8B3A71401CC4CAE5513A7F1A3494A3618EE819316AAD1D58433F236A759D66FB4154500E01EB4E1BC1DE42046E2D652D391CB8367A1649438867A02EB"...
1
1599
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" src="test2.htm"></page> </page>
5
4267
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 problem with that // prior to move, position = fixed; // at each move, I capture the new top value
0
8392
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8823
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8726
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8603
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7320
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5632
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4151
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2726
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1944
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.