Calendar chart

Gismo

Registered User.
Local time
Today, 03:40
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?
 
you need X.
make a query that has the X and Y values.

format([dateFld],"yyyy-mm") as X
 
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
 
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)>
 
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:
see the query here it will generate your dates.
 

Attachments

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
 
uplooad a sample db, including your module.
 

Users who are viewing this thread

Back
Top Bottom