Quote:
|
quote:Frankly, I doubt it... It is unlikely that suspending my doubt would allow me suddenly to be elected to a high political office (as just one of myriad such examples). Just for what itâs worth...
|
But Brian, do you want to be elected to a high political office? If that's what you want,
Quote:
|
quote:Quit doubting yourself
|
:D
BTW, another option to all of this would be to use the "NotInList" event. If someone enters a name not in the list, you could popup your addinitiator form (do it Modal so the form must be closed before they can do anything else). When the form is closed, set
Response = acDataErrAdded
Response is a parameter of the NotInList event. acDataErrAdded will automatically refresh the dropdown list.
And if all you are doing is adding a name to your initiator lookup table, you could even take that all a step further by simply adding the initiator without the user having to see a form. In the NotInList...
strSQL = "INSERT into [initiatortable] SET ([Initiator]) VALUES (""" & Me.cboMyDropDown & "")"
DoCmd.SetWarnings False
DoCmd.RunSQL strSQL
DoCmd.SetWarnings True
Response = acDateErrAdded
Note: this assumes Me.cboMyDropDown will never have a quote in it.
The one problem with this is that it doesn't slow people down enough to see if they made a typo. So, change that to...
strMsg = """" & Me.cboMyDropDown & """ is not a valid initiator." & vbcrlf & vbcrlf
strMsg = strMsg & "Do you wish to add it?"
if vbYes = MsgBox(strMsg, vbQuestion + vbYesNo, "Add Initiator") then
... the code above ...
else
Response = acDateErrContinue
End If
Advantage: Don't need that damn addinitiator form anymore. Which means... one less thing to maintain.:D
Randall J Weers
Membership Vice President
Pacific NorthWest Access Developers Group
http://www.pnwadg.org