Lookup item in data base

darrrellx

Registered User.
Local time
Today, 13:47
Joined
Apr 25, 2005
Messages
22
I have created a switchboard for an inventory data base. I would like to add a control to the switchboard where I can look up an inventory item in my data base by clicking it and it opening an imput box for me.

Any idea as to how I can or if I can do this.

Thanks

Darrell
 
do you mean you want to select and item in your database, then use a command button to open a record in a form? i haven't understood your question. if it's what i think, you need to put a combo box on your switch, with the source as the field in the table you want to find, then a command button with the following code in the "on click" event of the button (change the bits applicable to you):

Code:
    Dim strCriteria As String

    If IsNull(cmbChooseHorse) Or cmbChooseHorse.Value = "" Then
        MsgBox "Please select a horse from the drop-down." _
             , vbInformation, "The PED - Invalid Action"
        Exit Sub
    Else
        strCriteria = "ID=" & Me.cmbChooseHorse

        DoCmd.OpenForm "frmHorse", acNormal, , strCriteria, , acDialog
               
    End If
 
(sorry, you don't need the acDialog at the end)
 

Users who are viewing this thread

Back
Top Bottom