Results 1 to 3 of 3
  1. #1
    5 Star Lounger
    Join Date
    Nov 2001
    Location
    Toronto Canada
    Posts
    920
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Database Name Translated (A2K)

    I've gone trolling through the Forum for a potential answer to my question, but I'm obviously not searching correctly.

    Each user has his own front end.

    AWS01_ABC.mdb
    AWS02_DEF.mdb
    AWS03_GHI.mdb

    I'm trying to create a text field on the opening menu that will display the user's name just so they feel like they belong.

    It would be something like:

    Iff(AWS01_ABC,"Peter",Iff(AWS02_DEF,"Paul",IIf(AWS 03_GHI,"Mary","Invalid"))) or something like that.

    My problem is that I don't know the correct terminology to get the real current database name.

    As always, will be grateful for any help on this
    Cheers,
    Andy

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Database Name Translated (A2K)

    CurrentProject.Name returns the name of the database (including the extension .mdb). You'd have to use something like

    But why don't you use the name under which the user is logged into Windows? This is returned by Environ("username") or by the custom function GetNetUser() function from <post:=446,010>post 446,010</post:>.

    Note: Environ can be used in VBA, but may be blocked in expressions on some PCs by a security setting.

  3. #3
    5 Star Lounger
    Join Date
    Nov 2001
    Location
    Toronto Canada
    Posts
    920
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Database Name Translated (A2K)

    Like, do you ever get bed? It would appear that no matter what time of the day or night I send out one of my "questions", you are there to answer.

    And it's a good thing for all of us lucky Loungers that you are.

    Anyway, thanks as always for your response. I shall persue your suggestion tomorrow, because I don't have your energy!
    Cheers,
    Andy

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •