DoCmd.OpenForm "frmHistory",,, "Return IS NULL"
Assuming the column name for Return in your table is "Return". If your
looking for any return value that is null you do not need to reference
to your form, simply query the table.
solaris_nite@hotmail.com (Aravind) wrote in message news:<6174ca57.0406152012.7abb5e96@posting.google. com>...[color=blue]
> Hi folks.
>
> I have 2 forms, frmMain and frmHistory.
>
> frmHistory has a field called Return.
>
> frmMain has a command button called "Due Today" (which will henceforth
> be called as DT), which opens frmHistory and filters it to display
> records where the value of Return is Null
>
> DT has the following code:
> DoCmd.OpenForm "frmHistory",,, Forms!frmHistory!Return = Null
>
> When I click on DT, frmHistory is opened, but not filtered. When I
> close frmHistory, and click on DT again, i get an error message
> stating that "Microsoft Access can't find the form 'frmHistory'
> referred to in a macro expression or Visual Basic code". But when I
> click on DT again, frmHistory is opened but still not filtered. Does
> anyone know what's going on? I'm using Access 97. Thank you.[/color]