This is the senario;
I have a database which creates a report of batch numbers occuring on a specific day.
The form is linked to a report which returns the days on which a particular batch number occurs.
I want to be able to click on a date in the report and filter the form according to the report.
I have already created a clickable link (Hyperlink) in the report which is the date I want to link back to the main form as the filter.
The code I currently have uses the following variables.
[DateofTest] is the column in the record table
Main is the form name
DateOfTest is the created day that a searched for batch number occurs on in the report.
There are lots of examples of this code around but all deal with numbers or strings not datecodes, so Ive already been through the "Type mismatch" routine. This code doesnt freak but equally does'nt filter. The filter button is lit in the form "Main" but it displays all records.
Where did I go wrong?
I have a database which creates a report of batch numbers occuring on a specific day.
The form is linked to a report which returns the days on which a particular batch number occurs.
I want to be able to click on a date in the report and filter the form according to the report.
I have already created a clickable link (Hyperlink) in the report which is the date I want to link back to the main form as the filter.
The code I currently have uses the following variables.
[DateofTest] is the column in the record table
Main is the form name
DateOfTest is the created day that a searched for batch number occurs on in the report.
Code:
Private Sub DateOfTest_Click() DoCmd.OpenForm "Main", acNormal, , [DateOfTest] = Me.DateOfTest End Sub
Where did I go wrong?
Comment