I have a form with a combo box for a user to select from a range of dates. The form is based of a table where each date is a record. Each date has up to 6 attachments, each in a separate field. How can I check if an attachment field is empty when a user selects a date? I am trying to code an "On Click" event.
I also want to make it so that if a certain field lacks an attachment, then the checkbox that would normally allow a user to select that attachment will be greyed-out and say something like "No data exists for this date"
I tried doing a simple if statement
'Go through the recordset, testing each record to see if the date matches the selected one
'If it doesn't match, go to the next one
While Not fldDate = dteDate
rst.MoveNext
Wend
MsgBox fldDate
If rstPIANO.Fields("FileName") = Null Then MsgBox "No PIANO Data exists for this date"
If rstMassBalance.Value = Null Then MsgBox "No Mass Balance Data exists for this date"
If rstIR.Value = Null Then MsgBox "No IR Data exists for this date"
If rstD86.Value = Null Then MsgBox "No D86 Data exists for this date"
If rstGC.Value = Null Then MsgBox "No GC Data exists for this date"
If rstMiniGasGraphs.Value = Null Then MsgBox "No Mini Gas Graph Data exists for this date"
This gives me an error that says "Object invalid or no longer set"