D
DetRich
Hello,
I have a form which displays info about certificates installed on a server.
It is bound to a certificates table. I need to display data from another
field in a text box. This is the environment for that server (think Dev,
Prod, test, etc.). This comes from the main server table. I would like to
have the correct environment displayed when the hostname changes. So, I
think that I need code behind the hostname_OnChange event. I need to
populate the environment text box with the results of the following query:
Select Environment from tblServers
Where tblServer.Hostname = Me.Hostname.
My 2nd idea is to set the control source for the Environment text box using
a DLookup:
DLookup ("Environment", "tblServers", "tblServers.hostname = Me.Hostname")
Can anyone tell me if either of these is a valid solution? Which is better?
For the 2nd option, is it better to use a DLookup, or actual SQL, like this:
Select environment
From tblServers
Where tblServers.hostname = Me.hostname
Thanks,
Rich
I have a form which displays info about certificates installed on a server.
It is bound to a certificates table. I need to display data from another
field in a text box. This is the environment for that server (think Dev,
Prod, test, etc.). This comes from the main server table. I would like to
have the correct environment displayed when the hostname changes. So, I
think that I need code behind the hostname_OnChange event. I need to
populate the environment text box with the results of the following query:
Select Environment from tblServers
Where tblServer.Hostname = Me.Hostname.
My 2nd idea is to set the control source for the Environment text box using
a DLookup:
DLookup ("Environment", "tblServers", "tblServers.hostname = Me.Hostname")
Can anyone tell me if either of these is a valid solution? Which is better?
For the 2nd option, is it better to use a DLookup, or actual SQL, like this:
Select environment
From tblServers
Where tblServers.hostname = Me.hostname
Thanks,
Rich