Use local query to determine default field value

M

Mike C.

I'm no Access database expert but have managed to get it to do most of what I want. I'm using Access 2000 and built a database that multiple users are using to log information. Each user has an mde on their desktop and that mde updates tables on a shared network drive. I need to keep this as simple and quick as possible for the users and am trying to avoid a required login. I have a field in one of the tables that is linked to for the users' names. A local table and query provide the users name to be used in that field and currently I have a combo box that allows them to select their name as the only one in the drop down menu. What I want instead is to have that value set as the default value displayed in that combo box. I'm willing to change the user name combo box to a text field if it would simplify my task.

I went to the properties of the user name combo box and tried to set the default value to that field but I'm not sure enough of what I'm doing to be sure I didn't do it incorrectly. I wonder if someone might give me the correct way to do this.

On a side note I'd really like to have the local database look up the IP address of the computer it is executed from and use that value to look up the user name associated with that IP from a table in the shared network database then save the appropriate user or allow them to edit it if they're setting at another workstation. I found some code but was unable to get it to function. If you have done this I'd love to see the basics of how.
 
D

Duane Hookom

You can find code to get the current NT Login and the workstation at
http://www.mvps.org/access/api/index.html.

--
Duane Hookom
MS Access MVP


Mike C. said:
I'm no Access database expert but have managed to get it to do most of
what I want. I'm using Access 2000 and built a database that multiple users
are using to log information. Each user has an mde on their desktop and that
mde updates tables on a shared network drive. I need to keep this as simple
and quick as possible for the users and am trying to avoid a required login.
I have a field in one of the tables that is linked to for the users' names.
A local table and query provide the users name to be used in that field and
currently I have a combo box that allows them to select their name as the
only one in the drop down menu. What I want instead is to have that value
set as the default value displayed in that combo box. I'm willing to change
the user name combo box to a text field if it would simplify my task.
I went to the properties of the user name combo box and tried to set the
default value to that field but I'm not sure enough of what I'm doing to be
sure I didn't do it incorrectly. I wonder if someone might give me the
correct way to do this.
On a side note I'd really like to have the local database look up the IP
address of the computer it is executed from and use that value to look up
the user name associated with that IP from a table in the shared network
database then save the appropriate user or allow them to edit it if they're
setting at another workstation. I found some code but was unable to get it
to function. If you have done this I'd love to see the basics of how.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top