David McAfee
DMcAfee at haascnc.com
Wed Jul 23 14:38:51 CDT 2003
Don, couldn't you just make a function such as (OTTOMH): Option Compare Database Option Explicit Public MyInput As String Public Function DonsInputBox(Optional Prompt As String, Optional Title As String) As String 'I omitted xpos, ypos, help file and context for simplicity DoCmd.OpenForm "frmInputBox", , , , , acDialog, "Prompt|Title" If Nz(MyInput, "") <> "" Then DonsInputBox = MyInput End Function The form would have the following code: Option Compare Database Option Explicit Private Sub cmdCancel_Click() DoCmd.Close acForm, Me.Name, acSavePrompt End Sub Private Sub cmdOK_Click() MyInput = Me.txtinput Call cmdCancel_Click End Sub Private Sub Form_KeyUp(KeyCode As Integer, Shift As Integer) If KeyCode = 27 Then Call cmdCancel_Click End If End Sub Private Sub Form_Load() Dim arrX As Variant If Not IsNull(Me.OpenArgs) Then arrX = Split(Me.OpenArgs, "|") Me.txtPrompt = arrX(0) Me.Caption = arrX(1) End If End Sub HTH David McAfee -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Don Elliker Sent: Wednesday, July 23, 2003 9:40 AM To: accessd at databaseadvisors.com Subject: [AccessD] creating an inputbox form Howdy, I want to use my own form in place of the Inputbox. I am stuck on the part where, after a user selection, I return the value selected. It's like this; the user is on a form, makes a selection and up pops (my) inputbox. they pick something and close it. How do I know what they picked? TIA, _d "Things are only free to the extent that you don't pay for them".-Don Elliker _____ MSN 8 helps ELIMINATE E-MAIL <http://g.msn.com/8HMRENUS/2743??PS=> VIRUSES. Get 2 months FREE*. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://databaseadvisors.com/pipermail/accessd/attachments/20030723/b4044dbe/attachment-0001.html>