473,394 Members | 1,701 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,394 software developers and data experts.

Positioning objects using VB

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 1060
Killer42
8,435 Expert 8TB
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
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 Expert 8TB
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
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. ...
4
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:...
11
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
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...
3
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...
2
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....
2
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...
2
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...
1
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...
1
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,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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
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...

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.