Calendar chart (1 Viewer)

Gismo

Registered User.
Local time
Today, 08:16
Joined
Jun 12, 2017
Messages
1,298
Hi all,

I need to draw up a chart, Y = intervals (100, 600, 1200, 2400 and 3000)
x = Month and Year.
my data is a product code with a data.

who would I accomplish this as i do not have the x value in a table?
 

Ranman256

Well-known member
Local time
Today, 01:16
Joined
Apr 9, 2015
Messages
4,337
you need X.
make a query that has the X and Y values.

format([dateFld],"yyyy-mm") as X
 

Gismo

Registered User.
Local time
Today, 08:16
Joined
Jun 12, 2017
Messages
1,298
Will I need to create a table with future dates? wont this table become so huge that it will become un manageable? Not sure how to handle this one
 

missinglinq

AWF VIP
Local time
Today, 01:16
Joined
Jun 20, 2003
Messages
6,423
I suspect that a better explanation (in plain language) of what you're actually trying to do here would help us help you.

my data is a product code with a data.
Doesn't really tell us a lot.

Linq ;0)>
 

Gismo

Registered User.
Local time
Today, 08:16
Joined
Jun 12, 2017
Messages
1,298
I need a table with dates, today's date for the next 6 month.
this is to be used in a chart as x , I have value to use for y

I tried using the below module but not sure how to start with today's date and to run for a range of 6 month (+- 183 days). The function "Date()" does not work.
Code:
Public Sub FillDates()
' Will fill a Date Field with consecutive date values.

Dim Db As DAO.Database
Dim rs As Recordset
Dim dteFrom As Date
Dim dteTo As Date
Set Db = CurrentDb
Set rs = Db.OpenRecordset("tblDates")
dteFrom = [Date()]
dteTo = DateAdd("y", 190, [Dates])
With rs
Do Until dteFrom = dteTo + 1
.AddNew
!Dates = dteFrom
.Update
dteFrom = dteFrom + 1
Loop
End With
Set Db = Nothing
Set rs = Nothing
End Sub
 
Last edited:

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 13:16
Joined
May 7, 2009
Messages
19,246
see the query here it will generate your dates.
 

Attachments

  • genDate.zip
    20.5 KB · Views: 31

Gismo

Registered User.
Local time
Today, 08:16
Joined
Jun 12, 2017
Messages
1,298
I have managed to build a module to created dates I require but I dont know how to execute the module called "Dates" please could you assist. Would be great if i could run it from a macro as i need to run a few other queries as well
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 13:16
Joined
May 7, 2009
Messages
19,246
uplooad a sample db, including your module.
 

Users who are viewing this thread

Top Bottom