Hi all,
I'm working on a litle project and have run into a snag.
I would like to read the starting/ending dates of specific users and display then in a timeline.
This is just to show when a user is booked and for which days ie
Can anybody assist in how to create something like this in Access?
Regards
9 9623
Hi all,
I'm working on a litle project and have run into a snag.
I would like to read the starting/ending dates of specific users and display then in a timeline.
This is just to show when a user is booked and for which days ie
Can anybody assist in how to create something like this in Access?
Regards
I do not know of any mechanism within Access by which this could easily be accomplished. Off the top of my head, the closest approximation would be a series of 7 Check Boxes (M thru S) for any given Date which could then be checked and give some visual indication of a Time Line but this seems a little far fetched (2,555 Check Boxes for a given Year per person). Give me a little time to think on it.
Hi all,
I'm working on a litle project and have run into a snag.
I would like to read the starting/ending dates of specific users and display then in a timeline.
This is just to show when a user is booked and for which days ie
Can anybody assist in how to create something like this in Access?
Regards
The image you've provided resembles MSProject document. Have you think about exporting your data to MSProject document opened either as separate application or as Unbound object control on a form ?
It looks very similar to MS Project indeed, but was designed in another package using the web as front-end and SQL as a backend, I was just given a sample to see if it can be done in ACCESS to save on costs.
I was thinking along the lines of 365 boxes in a table, start gets an image and everyting between another, the ending then gets another image to make it look nice???
STUCK...
It looks very similar to MS Project indeed, but was designed in another package using the web as front-end and SQL as a backend, I was just given a sample to see if it can be done in ACCESS to save on costs.
I was thinking along the lines of 365 boxes in a table, start gets an image and everyting between another, the ending then gets another image to make it look nice???
STUCK...
If I've understood what do you mean, you want to solve it via sql queries.
I'm not sure whether this solution will succeed.
I reccomend you the following:
1) you've said that this was previously implemented using some Activex control, have you thought about using this control in Access
2) you may obtain Activex control implementing Gantt's chart presentation
3) you may use Excel
4) and at last you may use MSProject -
hereby is my solution
tblUsers
keyUserID (PK, Long(Autonumber))
txtName (Text)
tblBookings
keyBookingID (PK, Long(Autonumber))
keyUserID (FK, Long(Autonumber))
dteBookedOn (Date)
intDays (Integer) -
-
Private Sub btnMSProject_Click()
-
-
Dim prjProject As MSProject.Project
-
Dim appMSProject As MSProject.Application
-
Dim tskTask As MSProject.Task
-
Dim rsUsers As New ADODB.Recordset
-
Dim rsBookings As New ADODB.Recordset
-
Dim sqlQuery As New SQLSelect
-
Dim strSQL As String
-
Dim dteDate As Date, dteStart As Date, dteEnd As Date
-
-
Set appMSProject = CreateObject("MSProject.Application")
-
Set prjProject = appMSProject.Projects.Add
-
-
strSQL = "SELECT * FROM tblUsers;"
-
rsUsers.Open strSQL, CurrentProject.Connection, _
-
adOpenForwardOnly, adLockReadOnly
-
-
While Not rsUsers.EOF
-
-
Set tskTask = prjProject.Tasks.Add
-
tskTask.Name = rsUsers![txtName]
-
-
strSQL = "SELECT * FROM tblBookings WHERE keyUserID=" & rsUsers![keyUserID] & _
-
" ORDER BY dteBookedOn ASC;"
-
rsBookings.Open strSQL, CurrentProject.Connection, _
-
adOpenDynamic, adLockOptimistic
-
-
With tskTask
-
rsBookings.MoveFirst
-
appMSProject.ProjectSummaryInfo _
-
Start:=DateAdd("d", -1, rsBookings![dteBookedOn])
-
dteDate = rsBookings![dteBookedOn]
-
.Start = dteDate
-
rsBookings.MoveLast
-
dteDate = DateAdd("d", Nz(rsBookings![intDays], 1) - 1, _
-
rsBookings![dteBookedOn])
-
.Finish = dteDate
-
rsBookings.MoveFirst
-
End With
-
-
Do
-
dteStart = DateAdd("d", Nz(rsBookings![intDays], 1), _
-
rsBookings![dteBookedOn])
-
rsBookings.MoveNext
-
If Not rsBookings.EOF Then
-
dteEnd = rsBookings![dteBookedOn]
-
tskTask.Split dteStart, dteEnd
-
Else
-
tskTask.Finish = dteStart
-
Exit Do
-
End If
-
Loop
-
-
rsBookings.Close
-
rsUsers.MoveNext
-
-
Wend
-
-
rsUsers.Close
-
appMSProject.Visible = True
-
-
Set tskTask = Nothing
-
Set rsBookings = Nothing
-
Set rsUsers = Nothing
-
Set prjProject = Nothing
-
Set appMSProject = Nothing
-
-
End Sub
-
-
Good Luck
Sorry, a bug was detected. Method Task.Split check whether it falls into nonworking days and do what it supposes to be right.
So I've added code which sets all week days to working. -
-
Private Sub btnMSProject_Click()
-
-
Dim prjProject As MSProject.Project
-
Dim appMSProject As MSProject.Application
-
Dim tskTask As MSProject.Task
-
Dim rsUsers As New ADODB.Recordset
-
Dim rsBookings As New ADODB.Recordset
-
Dim sqlQuery As New SQLSelect
-
Dim strSQL As String
-
Dim dteDate As Date, dteStart As Date, dteEnd As Date
-
-
Set appMSProject = CreateObject("MSProject.Application")
-
Set prjProject = appMSProject.Projects.Add
-
-
'---- Set all week days as working because Task.Split method is too clever
-
For Each wd In prjProject.Calendar.WeekDays
-
wd.Working = True
-
Next
-
-
strSQL = "SELECT * FROM tblUsers;"
-
rsUsers.Open strSQL, CurrentProject.Connection, _
-
adOpenForwardOnly, adLockReadOnly
-
-
While Not rsUsers.EOF
-
-
Set tskTask = prjProject.Tasks.Add
-
tskTask.Name = rsUsers![txtName]
-
-
strSQL = "SELECT * FROM tblBookings WHERE keyUserID=" & rsUsers![keyUserID] & _
-
" ORDER BY dteBookedOn ASC;"
-
rsBookings.Open strSQL, CurrentProject.Connection, _
-
adOpenDynamic, adLockOptimistic
-
-
With tskTask
-
rsBookings.MoveFirst
-
appMSProject.ProjectSummaryInfo _
-
Start:=DateAdd("d", -1, rsBookings![dteBookedOn])
-
dteDate = rsBookings![dteBookedOn]
-
.Start = dteDate
-
rsBookings.MoveLast
-
dteDate = DateAdd("d", Nz(rsBookings![intDays], 1) - 1, _
-
rsBookings![dteBookedOn])
-
.Finish = dteDate
-
rsBookings.MoveFirst
-
End With
-
-
Do
-
dteStart = DateAdd("d", Nz(rsBookings![intDays], 1), _
-
rsBookings![dteBookedOn])
-
rsBookings.MoveNext
-
If Not rsBookings.EOF Then
-
dteEnd = rsBookings![dteBookedOn]
-
If dteStart < dteEnd Then tskTask.Split dteStart, dteEnd
-
Else
-
tskTask.Finish = dteStart
-
Exit Do
-
End If
-
Loop
-
-
rsBookings.Close
-
rsUsers.MoveNext
-
-
Wend
-
-
rsUsers.Close
-
appMSProject.Visible = True
-
-
Set tskTask = Nothing
-
Set rsBookings = Nothing
-
Set rsUsers = Nothing
-
Set prjProject = Nothing
-
Set appMSProject = Nothing
-
-
End Sub
-
-
Have a look at this. It may give you some ideas without going to heavily in to coding
http://www.access-programmers.co.uk/forums/showthread.php?t=108369
Stunning, thanks for the input. Will fiddle.
Hi again,
Problem....
As far as I understand, Gantt charts do no allow for "multiple item" listings per line...
Ie, we have Paul and it shows him to have two appointments (or three or four etc), underneath him would be Mary, with a few appointments etc etc, now there needs to be one line per person / resource which shows they availebility. A gantt chart will add a new line for every new event..
There was a web page created by somebody else, I do not have the code or the sample as it was a proposal from their side, just WAY tooooo expensive, hence it has been deleted.
Hi again,
Problem....
As far as I understand, Gantt charts do no allow for "multiple item" listings per line...
Ie, we have Paul and it shows him to have two appointments (or three or four etc), underneath him would be Mary, with a few appointments etc etc, now there needs to be one line per person / resource which shows they availebility. A gantt chart will add a new line for every new event..
There was a web page created by somebody else, I do not have the code or the sample as it was a proposal from their side, just WAY tooooo expensive, hence it has been deleted.
Hi!
The code in #6 displays exactly what you want. The only question is whether MSProject is too expensive for you or not.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Cobb |
last post by:
Hello-
I'm interested in building a graphical timeline for a series of tasks that
are stored in a SQL Server 2000 database. The tasks reside within a table.
We also have a table to track the...
|
by: Thorsten Bast |
last post by:
Hi,
I'm sorry if this problem should have been sufficiently discussed
here, but so far I could not find a satisfactory answer.
I'm managing rental contracts with an access database and want to...
|
by: Abhishek Bagga |
last post by:
I want to Display a timeline in my Application based on which I will create
a flow of series.
How can I create a Timeline, somewhat similar to the ones available in video
authoring tools.
...
|
by: krose |
last post by:
I am looking for a control that would look like a timeline (12 hours)
which would allow the user to click at a particular location on the
timeline, then allow characteristics to be associated with...
|
by: jshanman |
last post by:
I am working on a timeline API that devevelopers can use to add a
dynamic timeline to their sites.
Here is a *working* demo of the basic interface. (it works for me
anyway on ie6 & firefox 1.5)...
|
by: Martin Schneider |
last post by:
Hi!
I am currently writing an application allowing to plan events on a time
basis.
The ideal approach would be to show a "timeline" display, just like in a
video editing software, allowing to...
|
by: nbt725 |
last post by:
Dear Sir,
Hello ! I have use simile timeline. (http://simile.mit.edu/mail.html). I am new to timeline and would like to do following, please guide
me. In my timeline I have created 2 bands one...
|
by: doublestack |
last post by:
Hi everyone,
I have a xml file that Simile Timeline uses to call events...Some of the events have links in them and I need to have those links open a new window. As it stands now the links replace...
|
by: doublestack |
last post by:
Hi everyone,
I have a xml file that Simile Timeline uses to call events...Some of the events have links in them and I need to have those links open a new window. As it stands now the links replace...
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
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...
|
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...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
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,...
|
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...
|
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,...
|
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...
| |