473,804 Members | 2,117 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Positioning objects using VB

45 New Member
Hi There

Usually in the access forums, but trying to get a little more adventurous... Unfortunately not having much luck!

Trying to achieve an "Outlook" type calender for a report in access. Very similar to the example on http://www.access.hookom.net/Samples.htm

Expand|Select|Wrap|Line Numbers
  1. Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)Dim TopMargin As Long
  2. Dim OneMin As Long
  3. Dim DayStart As Date
  4. Dim StartTime As Date
  5. Dim EndTime As Date
  6.  
  7. DayStart = #10:00:00 AM#
  8. OneMin = 15
  9. TopMargin = 1440
  10.  
  11. Me.MoveLayout = False
  12.  
  13. Me.Customer.Top = TopMargin + (DateDiff("n",DayStart,StartTime) * OneMin
  14. Me.Customer.Height = (DateDiff("n", StartTime, EndTime))
  15. Me.Customer.Left = 1440
  16.  
  17. End Sub
I have practically copied the code from the example but I am receiving an error message: The control or subform is too large for this location (error 2100)

I am using MS Access 2007, the data that "fills" StartTime = 10:00, EndTime 13:00

Any help would be much appreciated, or whether I should post this in the Access forum - I was unsure!

Many Thanks

Dan
Oct 7 '07 #1
3 1073
Killer42
8,435 Recognized Expert Expert
Which line produces the error?

Hm... on further consideration, perhaps the problem is that DateDiff will be producing a negative number, since StartTime is actually zero.
Oct 7 '07 #2
NCRStinks
45 New Member
Which line produces the error?

Hm... on further consideration, perhaps the problem is that DateDiff will be producing a negative number, since StartTime is actually zero.
Hi There

I have managed to sort out this problem. Using the "TimeValue" function. I think with saving the field as "date/time" in access even when only typing a time, it attaches a date to it too.

By using the TimeValue, i have been able to eliminate the error.


Many Thanks


Dan
Oct 7 '07 #3
Killer42
8,435 Recognized Expert Expert
Ok. Glad to see you've got it sorted. :)
Oct 7 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

9
32066
by: Bryan R. Meyer | last post by:
Hello Everyone, The problem of browser resizing has become an issue for me. While redesigning my webpage, I set the left and right margins to be auto so that my content would be centered. However, there are images that I used absolute positioning in order to place them in the appropriate location on my page. When I do a browser resize, these images do not move (obviously). However, the rest of my content is auto centered as...
4
2719
by: Jane Withnolastname | last post by:
I am trying to re-work an old site by replacing the html with css. On the main page, I have a logo image which I needed centred on the initial screen. I found the solution here: http://www.wpdfd.com/editorial/wpd0103.htm#toptip (the second example) The problem is, under the image is a large table. But using the above positioning, now the table starts at the top of the page and runs underneath the image.
11
2649
by: NS | last post by:
I am relativly new to css positioning and have a question regarding the display of a DHTML pop-up Here is the basic HTML I am using: <html> <head> <script language="JavaScript"> <!--
1
2804
by: Charles Harrison Caudill | last post by:
with tables there is a clean and algorithmic way to organize things, but with css which is, once you get it working, much cleaner, I have to tweak and patch and hope and pray and curse before things are positioned the way I want them. It *should* be easy to say: this goes on the left, this goes on the right, this goes in the center, all on the same line, with a background image...but I'm missing something. I would very much like a...
3
1453
by: Bill Zack | last post by:
I have an interesting little ASP.NET problem. I have to position and show multiple "frames" in an IE6 browser at run time in a singe ASP.NET page. Each "frame" will contain a couple of navigation links and one chart object (currently an ActiveX control but we will be switching to native .NET controls soon). The number of frames shown on the page will be selected by the user dynamically at run time. What I need to do is define a...
2
1918
by: Jawiko | last post by:
I am trying to place objects like buttons, calendar, listboxes etc on a webform. I am strugling with the positioning. I placed all the objects in a cell and the cell centers itself on the page. However the objects don't appear on the webpage on the same place as the design form in Visual Web Developer. What can i do to keep the objects in place? any help would be appreciated.
2
1482
by: Michi | last post by:
Hallo, for hours i'm searching for an solution for the following problem: Inside a container i have some cathegories and in each of them some questions (look at HTML), The questions should be shown or hidden when clicking a cathegory (look JS and CSS). With a click on a question, it should be cloned and the clone should be placed over the question so you can drag and drop it from there to somewhere else.
2
1932
by: TheCruelPanda | last post by:
Hey there. My name is Rowan, and it's been three weeks since I last used tables for an HTML design. Okay, I'm rather new to CSS and I have a big positioning problem here. It might not be a really huge problem, but I've been fighting it for days, and have received no help so far. Have a look at this (try it out in IE and Firefox please) http://www.discoverourmusic.com/rowan/css/home.html - The problem's with the fairy at the top. On...
1
2229
by: final farewell | last post by:
Hello, I am using Ekhau Location Tracking System for an assignment. It is a system that is able to track configured tags attached to people or objects. I am new to the Ekahau Location Tracking System, but I have quite a good idea how it works. I have an assignment to develop a real application using the Ekahau Positioning Engine (The Engine is a software based real-time location system). The Location Tracking Model of the area to be...
1
1275
by: mohammadtaha | last post by:
Hi, I am using CSS to position objects (<SPAN> and <DIV> tags) on my webpage, which is working great on regular computer monitors, when I view the same page on a wide screen laptop monitor, one of my objects (<span id="logo">) changes position and is placed about 5 pixels below where it suppose to be. If I adjust the position to compensate for these five pixels, then the object is correctly positioned on the widescreen monitor but...
0
10604
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
10354
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...
1
10359
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10101
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
6870
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
5536
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...
0
5675
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4314
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
3837
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.