I have a report that prints one record. I use this filter:
[tblStdD] = Forms!frmStudent!txtStudentID
Use the value in the variable ShowGD to determine whether or not a text box shows on the report. I use a checkbox on the form to toggle a value in the tblStdGD field in the tblStudent table. When I check the box on the form the value in the field adjusts appropriately. The problem is that for some reason the value is not registering correctly on the report.
Dim ShowGD As Boolean
ShowGD = Nz(DLookup("tblStdGD", "tblStudent"), 0)
Me!txtGuideReading.Visible = ShowGD
When I use a message box to display the value I get '0' regardless of the value in the tblStdGD field.
MsgBox "Value = " & Nz(DLookup("tblStdGD", "tblStudent"), 0) , vbInformation, " Test"
Not sure why I am not getting the right value.