Sorry, it's not possible. It's only possible with cycletimes of the machines. Forget it.if you can give a mock-up sample of the graph.
arnelgp, can you tell me how you do the painting of the bar? You use "PaintWithblack", is this an instruction? I neither can't find a function with that name?Sorry, it's not possible. It's only possible with cycletimes of the machines. Forget it.
Thanks for the reply.
Bieke
Looks nice but i can't see the timelines?Here is my approach which is really just a different implementation of what @CJ_London proposed. It is set up to handle an unlimited amount of machines, but you will have to copy and paste a subform for each machine, and give it the proper name which should be the same for @cj_lodon. I set it up to handle no more than 200 events per machine. I also added the double click on a failure to see its details.
View attachment 96944
Hello MajP, The problem was that the date format was MMDDYYY and in belgium it is MMDDYYY.Did you select a date from the pulldown?
In theory you could have a timeline for each machine. You would only want to show timelines for a form on that date.
Any chance you could post a table with all the data? That way can demonstrate picking different dates and how to handle showing different time lines based on data for that date.
Umm...did you really mean YYY x3 as that will give nonsense results.Hello MajP, The problem was that the date format was MMDDYYY and in belgium it is MMDDYYY.
I'm now expand the form for 40 machines. I will post a real screenshot from live data.
Thank u very much for this, also for everyone who helped with this topic. (sorry for my englisch)
Kind regards,
Bieke
sorry i mean your format was MMDDYYYY and ours is DDMMYYYY.Umm...did you really mean YYY x3 as that will give nonsense results.
Anyway, that's exactly the same format in each case which for today would give
?Format(Date,"mmddyyy")
121821352
arnelgp, can you explaine this for me? You use "PaintWithblack", is this an instruction? I neither can't find a function with that name? I find your solution with excel very nice, also for other applications. I tried to understand your code but i'm stuck with this question.arnelgp, can you tell me how you do the painting of the bar? You use "PaintWithblack", is this an instruction? I neither can't find a function with that name?
Bieke
Thanks ,that's why i could not find it ! Have a nice sunday.see the mach_viz.xlsm.
on Sheet1 (VBA), it has all the public function.
Goodmorning MajP,Here is my approach which is really just a different implementation of what @CJ_London proposed. It is set up to handle an unlimited amount of machines, but you will have to copy and paste a subform for each machine, and give it the proper name which should be the same for @cj_lodon. I set it up to handle no more than 200 events per machine. I also added the double click on a failure to see its details.
View attachment 96944
Public Sub Build()
Dim frm As Access.Form
Dim ctrl As Access.Label
Dim i As Integer
DoCmd.OpenForm "frmTimeline", acDesign, , , , acHidden
Set frm = Forms("frmTimeLine")
For i = 1 To 200
Set ctrl = Application.CreateControl("frmTimeLine", acLabel, acDetail, , , 0, 0, 100, 100)
With ctrl
.Name = "lbl" & i
.BackStyle = 1
.BackColor = vbRed
.Visible = False
End With
Next i
End Sub
Public Sub ResetLabels()
Dim ctrl As Access.Label
Dim i As Integer
For i = 1 To 200
Set ctrl = Me.Controls("lbl" & i)
With ctrl
ctrl.Tag = ""
ctrl.Left = 10
ctrl.Width = 10
ctrl.Visible = False
End With
Next i
End Sub
Thanks for helping me out, i ren to your code and i understand it now. Have a nice day. Regards Bieke.When I built the timeline I needed 200 labels stacked in the corner and invisible. I gave them width and height of 100 pixels so I could see that it was working. I was not going to do that by hand. Here is the code, it is in the module
Code:Public Sub Build() Dim frm As Access.Form Dim ctrl As Access.Label Dim i As Integer DoCmd.OpenForm "frmTimeline", acDesign, , , , acHidden Set frm = Forms("frmTimeLine") For i = 1 To 200 Set ctrl = Application.CreateControl("frmTimeLine", acLabel, acDetail, , , 0, 0, 100, 100) With ctrl .Name = "lbl" & i .BackStyle = 1 .BackColor = vbRed .Visible = False End With Next i End Sub
Likely when you were testing something happened that put the form into design view and you saved it as so.
View attachment 96969
So you now saved the default with some visible controls and tag properties. I think the far one is lbl10.
When the code runs it unhides the controls it needs, moved to correct location, and resizes it. If you use >10 labels on a given timeline then no problem. But if you use less then it will not move or retag the controls so it appears left over.
You could just fix this, but in case it happens again I added code so the first thing it does is restack and hide all labels before moving and resizing.
Code:Public Sub ResetLabels() Dim ctrl As Access.Label Dim i As Integer For i = 1 To 200 Set ctrl = Me.Controls("lbl" & i) With ctrl ctrl.Tag = "" ctrl.Left = 10 ctrl.Width = 10 ctrl.Visible = False End With Next i End Sub
Thanks for helping me out, i ren to your code and i understand it now. Have a nice day. Regards Bieke.
Hello majP,When I built the timeline I needed 200 labels stacked in the corner and invisible. I gave them width and height of 100 pixels so I could see that it was working. I was not going to do that by hand. Here is the code, it is in the module
Code:Public Sub Build() Dim frm As Access.Form Dim ctrl As Access.Label Dim i As Integer DoCmd.OpenForm "frmTimeline", acDesign, , , , acHidden Set frm = Forms("frmTimeLine") For i = 1 To 200 Set ctrl = Application.CreateControl("frmTimeLine", acLabel, acDetail, , , 0, 0, 100, 100) With ctrl .Name = "lbl" & i .BackStyle = 1 .BackColor = vbRed .Visible = False End With Next i End Sub
Likely when you were testing something happened that put the form into design view and you saved it as so.
View attachment 96969
So you now saved the default with some visible controls and tag properties. I think the far one is lbl10.
When the code runs it unhides the controls it needs, moved to correct location, and resizes it. If you use >10 labels on a given timeline then no problem. But if you use less then it will not move or retag the controls so it appears left over.
You could just fix this, but in case it happens again I added code so the first thing it does is restack and hide all labels before moving and resizing.
Code:Public Sub ResetLabels() Dim ctrl As Access.Label Dim i As Integer For i = 1 To 200 Set ctrl = Me.Controls("lbl" & i) With ctrl ctrl.Tag = "" ctrl.Left = 10 ctrl.Width = 10 ctrl.Visible = False End With Next i End Sub
It is not possible to change this field because it is a table of a general data management package.I have never worked with the "date time extended" data type. If you do not absolutely need it then get rid of it and make it a Date field. It is impossible to work with. I cannot not figure out how to use it. You cannot do any date time functions on it without a datatype mismatch. I would have to ask around. I have tried about 10 ways to get it into a date data type and everything fails.