UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Merging Record Base On Equal Value, Access 2016    
 
   
volvox02
post Dec 10 2018, 04:26 PM
Post#1



Posts: 20
Joined: 8-November 18



Hello every ones,

I need some help with some record manipulation.

I want to merge the records that have the same UnitCode value on my gantt chart into one line.

Not sure if its query or VBA related problem... The only way i have been able to merge my lines together was by putting all into a single record but as my data will grow it will cause some problems in to long run if I am not mistaking ?


I have attach a sample of some fake data that my database will be using and a sample of my gantt chart.
(yes it is heavy inspired by Peter Hibbs fine work)
Attached File  data_sample.png ( 10.01K )Number of downloads: 11
Attached File  merging_gantt_lines.png ( 18.93K )Number of downloads: 12
Go to the top of the page
 
volvox02
post Dec 11 2018, 09:22 AM
Post#2



Posts: 20
Joined: 8-November 18



I should have included this piece of code :

CODE
Private Sub Merging()

Dim dbs As DAO.Database
Dim rst As DAO.Recordset
Dim rstFiltered As DAO.Recordset
Dim i, j, k As String

Set dbs = CurrentDb
Set rst = dbs.OpenRecordset("Query1", dbOpenDynaset)

Do While Not rst.EOF
i = rst!UniteCode
rst.Filter = "UniteCode = '" & i & "'"
Set rstFiltered = rst.OpenRecordset

Do While Not rstFiltered.EOF
j = rstFiltered!DT
k = rstFiltered!DX
Loop
Loop

End Sub


I just dont know what to do with my variables
Go to the top of the page
 
Larry Larsen
post Dec 12 2018, 02:33 PM
Post#3


UA Editor + Utterly Certified
Posts: 24,350
Joined: 26-August 02
From: Melton Mowbray,Leicestershire (U.K)


Hi

Have you contacted Peter..??

He may have an idea or confirm that it can't be done in a gant chart..
thumbup.gif

--------------------
"Time...We have exactly the same number of hours per day that were given to Helen Keller, Pasteur, Michaelangelo, Mother Teresa, Leonardo da Vinci, Thomas Jefferson, and Albert Einstein"
H. Jackson Brown
Go to the top of the page
 
volvox02
post Dec 13 2018, 04:30 PM
Post#4



Posts: 20
Joined: 8-November 18



i didn't, but now i will.

Thank you !

Pierre
Go to the top of the page
 


Custom Search


RSSSearch   Top   Lo-Fi    18th July 2019 - 01:17 PM