HOw to solve this??

gabo

Registered User.
Local time
Today, 14:24
Joined
Apr 29, 2004
Messages
11
Hi, I have a problema and I don't know exactly how to solve it

I'm developing an application for some doctors, but I need to put the name of the doctor in all the forms and reports, the question is:

can I asign the value of the name of the doctor to a variable or something so I just need to capture it once and put the variable in all the forms and reports so in that way fill the variable with the name, I think in using a label in every form

For example I create a a constant in a module
Public conUsuario = "Dr. José A. Parra Morones"
and it works great but I want to know is there any other way to link this constant with a field of a form so everything be dynamic

thank you :confused:
 
Last edited:
You can certainly do that... I have an identification set of forms that run on the startup of the application. The user types in his name and password and it goes from there. Once the user is validated it runs SetUsername function below and whenever I need that username I can call GetUsername. This is all run in a module and works great to Identify your users. Of coarse if you use access security they have a username function built right in. You can check your Help to get information on how to use that. Hope this helps.

Code:
Dim Username As String

Function setusername(name As String)

    Username = name
    
End Function

Function GetUserName() As String

    GetUserName = Username
    
End Function
 
Ok I think I understand that another question, in this code that you put here name will be the name of the field on a the form???? :confused:
 

Users who are viewing this thread

Back
Top Bottom