I'm working on creating a query based on another query that simplifies results into yearly records from monthly (so that all records of a given year will be shown as a sum).
What I have done is created a query with the fields that I need to have shown, including 'fldyear', in 'fldyear' i would like to have a criteria such as Like "*(inputboxresult)*" Where an inputbox is opened before the query and asks for the year required.
My input box works fine, it has simple code:
Dim strInput As String
Dim strMsg As String
strMsg = "Please Type Out The Year You Would Like To Search For (YYYY)"
strInput = InputBox(Prompt:=strMsg, title:="Year Search")
I am just missing the line to place the strinput into the criteria for the 'fldyear' field.
Something like:
DoCmd.Insert strmsg into querysbjyear.fldyear.criteria
Help would be appreciated.
Thanks,
ConfusedA
What I have done is created a query with the fields that I need to have shown, including 'fldyear', in 'fldyear' i would like to have a criteria such as Like "*(inputboxresult)*" Where an inputbox is opened before the query and asks for the year required.
My input box works fine, it has simple code:
Dim strInput As String
Dim strMsg As String
strMsg = "Please Type Out The Year You Would Like To Search For (YYYY)"
strInput = InputBox(Prompt:=strMsg, title:="Year Search")
I am just missing the line to place the strinput into the criteria for the 'fldyear' field.
Something like:
DoCmd.Insert strmsg into querysbjyear.fldyear.criteria
Help would be appreciated.
Thanks,
ConfusedA