Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2006
    Kent, UK

    Unanswered: Problems with custom text box

    First of all, I just want to point out that I don't know a particularly large amount about Access. Also, I would like to point out that this is probably a really dumb mistake on my part

    OK, I've created a combo box with a custom value list. Basically, using code, I want a button to run a certain query depending on what has been selected in the combo box.

    To test it, I have just been telling the button to display a message box (for example):

    Private Sub Command10_Click()
    If Me.cboSearch.Value = "Contractor ID" Then
    MsgBox "a"
    End If
    End Sub
    This works fine. However, changing the value to any of the other options doesn't work! I'd like to point out that Contractor ID is the first option in the list.

    Help would be appreciated ASAP please

    EDIT : OK, some of them are now working. The spellings definitely weren't wrong, but by simply renaming some it is now working. Sorry for this pointless thread

    I have another question though - I have created a search facility. However, it only brings up records that match exactly. Is it possible, for example, to search for names including "Dave" and have all records that contain Dave be included? Or even just a single letter and all names that contain the letter be included? I would still like to use queries as I am atm though, as it is vital to something else.
    Last edited by ShaunTaylor18; 12-05-06 at 13:14.

  2. #2
    Join Date
    Oct 2006
    Hi, try this.

    On the onclick event of your combbo box add the following two lines of code:


    I'm pretty sure that you only need the requery part, but it doesn't hurt.

    Hope this is what you were after.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts