I have a popup form opened as acDialog which prompts the user to enter just the year with which to display all relevant records in a continuous form. The variable BidYear passes the correct value back to the main form where the SQL code is executed but Access throws up another input box to enter a year. If I remove the variable BidYear and instead type in a year such as 2016 in its place, all records whose date field contain a date in 2016 are displayed. I found one article that states to enclose the variable in single quotes but all that does is display 0 records.
Code:
Me.RecordSource = "SELECT tblJobs.*, tblIsland.* FROM tblJobs INNER JOIN tblIsland ON tblJobs.JobID = tblIsland.JobID WHERE Year([BidDate])=BidYear ORDER BY BidDate ASC;"
Comment