[AccessD] Cannot set recordsource on Load Event (Resolved)

Steve Schapel miscellany at mvps.org
Sun Jan 27 14:35:26 CST 2008


Randall,

Sweet!  That's as neat a solution as any, for sure.

If it was mine, I'd still use Form B's Open event, rather than Load... 
but if it's working for you, no progblem!

Regards
Steve


RANDALL R ANTHONY wrote:
> Steve (and everyone),
> It was very simple really, based on your proposed resolution.  Since I'm resolving which query to use in form A, I just set the openargs with everything there. Works like a champ.   Solution below.  Thanks again!
> 
> Form A
> If  BusUnit = 1 then
>       DoCmd.OpenForm "Audit Entry", , , , , , "Select * from Audit_Data_Med WHERE " & Criteria
> else
>       DoCmd.OpenForm "Audit Entry", , , , , , "Select * from Audit_Data_Fred WHERE " & Criteria
> end if 
> 
> Form B
> Private Sub Form_Load()
>        Me.RecordSource = Me.OpenArgs
> End Sub



More information about the AccessD mailing list