PDA

View Full Version : How to display system date and other data



pdesh3
05-17-2007, 11:36 AM
Hi,

I have a form in which 3 fileds are displayed on the top banner. They are DATE, NAME, LOCATION.
1. I want to make DATE filed dynamic where it whould read system date and display on it when ever I open that Form. I don't know what control to take for this whether LABEL or TEXTBOX.

2. Name field should display the name of the person who logged into the system or it should display some name and when it is focused it should become a combo box from where I can select the other name.

3. Location filed also should work like above where default value should be displayed and when I click on it it should be editable. i.e. it should become combo box and should allow me to choose different option.

Is this possible? Can someone suggest any idea on how to implement this.
I tried doing it by keeping Labels intially but they were not editable.
Even if I use TextBoxes I am not getting any idea how to implement this.

Thanks.

asingh
05-17-2007, 07:20 PM
Hi,

Attached is a db which does what you want.

Combo Boxes where used, which load up when the form is clicked upon.

Data comes from the two native tables.

NOTE:
The first location values is hard-coded in the VBA.

regards,
asingh

geekgirlau
05-17-2007, 10:44 PM
It sounds as if you are trying to track changes made to the data, in which case you shouldn't be able to change the user or location name.

Environ("USERNAME") will give you the logon name of the user
Environ("COMPUTERNAME") will give you the name of their computer
Date() gives you today's date, and Now() gives you the date and time