a forward slash in name

bknight
BronzeLounger
Posts: 1391
Joined: 08 Jul 2016, 18:53

a forward slash in name

Post by bknight »

Unfortunately I have a forward slash in the name of one of my forms. What would be the correct syntax to open it in a class module?
I tried enclosing it in parentheses, but that didn't work and without them the compiler focuses on the slash itself with I believe expected expression.
An alternative would be to rename the form with the slash, but that involves other forms and queries.

bknight
BronzeLounger
Posts: 1391
Joined: 08 Jul 2016, 18:53

Re: a forward slash in name

Post by bknight »

Ah I found a solution.
DoCmd.OpenForm FormName:="frmP/L_By_Symbol", view:=acFormDS

User avatar
Gasman
2StarLounger
Posts: 104
Joined: 22 Feb 2022, 09:04

Re: a forward slash in name

Post by Gasman »

Get rid of it now. It will save you so much time later.
Do not use spaces either.
Using Access 2007/2019.
Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime.
Please, please use code tags when posting code snippets, click the </>icon.
Debug.Print is your lifesaver.