Open form either with table as record source or as query as record source
Posted on 2015-01-21
I have a form with two command buttons. One of them is set to open a form via: (opens the form for a new record)
DoCmd.OpenForm "frmContacts", acNormal, , , acFormAdd, acWindowNormal
But I also want to be able to open the same form with a query as it's record source. When the form opens it will display all of the records that meet the query criteria.
How can I do the 2nd option?