Access switchboard run code function with parameters

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I've got a switchboard item that uses the run code option to call a function.
My problem is that my function has a parameter and I can't figure out how to
call it. I keep getting: "There was an error executing the command".

My function call is: OpenRept "rptDemographics".

The function itself is in a Module:

Public Function OpenRept(ByVal rpt As String)
DoCmd.OpenForm "frmSelectYrMo", acNormal, , , , , rpt
End Function
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top