I'm trying to figure out a way to allow temporary overriding of a default value on an Add page.
On the Add page I have a field that has been set 'Edit As' a 'Lookup table' and a custom 'Display field' showing the "LastName, FirstName" of a user based on 'MemberID' with the default value set to "Session("MemberID")".
In the 'Before Process' event for the Add page, I have:
str = "Select * from Members where Members.Login='" & Session("UserID") & "'"
Set rstmp = server.CreateObject("ADODB.Recordset")
rstmp.open str,dbConnection
Session("MemberID") = rstmp("MemberID")
rstmp.close
set rstmp=nothing
It works fine and whenever a new record is added, the drop-down 'OppMgrID' is pre-populated with the "LastName, FirstName" of the person logged in. - Good to go.
The problem is that if the need arises to override what is in the Default, say when someone is adding records on behalf of someone else, what is selected from the drop-down isn't what gets recorded in the database, instead the Default is recorded. Yes, the user can then go in and Edit the record and change it, where it does work, but this is an added and unnecessary step.
Can what I'm trying to achieve be done and how? If someone out there knows how to do this, I would greatly appreciate the help.
Thanks.