I have vb script that builds a query with a sql stmt, the first field is the current month.
msqlbldREF = <A sql stmt that defines the query fields>
Set qdf = CurrentDb.CreateQueryDef("Where Used", msqlbldREQ)
DoCmd.OpenQuery qdf.Name
But now I need to make this into a form, because I want to highlight fields < 0.
So the query is built like:
User Input month/year: 09/2020
Item 09/2020 10/2020 11/2020 12/2020
XX-1 10 50 30 15
But the form, that I created a few months ago with the form builder:
Item 07/2020 08/2020 09/2020 10/2020 11/2020 12/2020
XX-1 Name? Name? 10 50 30 15
So Ideally, I would like to programattically build the form so that it starts at the selected month.
Any Ideas?
Thanks!