storing string

kingsgambit

Registered User.
Local time
Today, 01:18
Joined
May 27, 2001
Messages
134
I am new to the module thing, but I think this is what I need.
I want a button on my switchboard where the user can enter there user name and details. Each database would be for each salesperson for there laptop.
I want the database to save this info, then be able to call it up for putting there details on forms/reports
 
How could I call up the info so I could use it in other forms and reports. I thought I would need a Global variable. but I don't know how to do this or how to call the variable up.
 
If you want to know more about variables then I wrote a piece in a reply on this thread.
 
... Or INI file.


I would go the table. Look at RecordSet Objects and the DLookup Function.
 
I created a table to store the username.
I created a module
Option Compare Database
Option Explicit
Public strUserName As String
Could a reference strUsername to the table, how would I do this?
 
You could use DAO, ADO, or the DLookup() domain aggregate function to retrieve what you want.

Assuming there is only one row in the table:

strUserName = DLookup("[YourField]", "tblYourTable")

I'm not going to bother with DAO and I'm not going to attempt ADO :p as the DLookup() isn't going to slow anything down if you are just using it once to retrieve a value.
 

Users who are viewing this thread

Back
Top Bottom