I'm trying to save myself some necessary coding in the future.
I have several forms, and each user has their own unique form based on their LAN ID.
I currently can get those forms to open by using "WindowsUserName" in the Form's name. This is great because I won't have to go back to this code and change everything when those people who use the database change jobs. I only have to change the name of the form.
However, on their personal forms, I have put in some status bars, and various tools that references the name of the form.
- Where it says "LAN ID" that's the unique LAN ID of that user.
Forms!["Working Form - LAN ID]!StatusBar8.Panels(1).Text = "Opening up backend table..."
I tried this line of code: Forms!["Working Form - " + WindowsUserName + "]!StatusBar8.Panels(1).Text = "Opening up backend table..."
I tried various subset uses of the quotation marks around the Sub "WindowsUserName" and to no avail I continue to receive a debugging error.
I tried substituting the name of the form as a variable itself, and Access totally doesn't like that idea either.
I have come to terms with the possibility that I will just have to place into my coding documentation that if and when the user's LAN ID changes I can utilize the "Replace Text" feature in the coding environment and just change the user's lan id there.
But that would just make me have to do work, and I like to be lazy lol
So.... if there is a way to put my variable in there to call the LAN ID of the current user opening that form, it would make my life easier, if not... then... that's OK too.