Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2013

    Unanswered: Fill text box with data from table on click

    I am looking for the VBA code to fill a certain text box and run a query upon click of the ID for each input within a table placed on a form.

    Last edited by lee817; 07-01-13 at 08:28.

  2. #2
    Join Date
    Sep 2006
    Surrey, UK
    Provided Answers: 2
    No, sorry. I understand the first part, but not the second.

    Writing code to populate a text box from a button click is easy. The rest of the sentence from that point onwards doesn't make sense.
    • What does the query do - display a recordset, perform an action or something else entirely?
    • What is ID - a text box, a button to generate a unique number, an idiot detector or something else entirely?
    • What input? A control on the form, an input box prompt or something else entirely?
    • Is the table bound to the form, bound to a subform on the form in question or another table within the database?

    For starters:
    Private Sub cmdLazyWeb_Click()
        Dim strOutput as String
        strOutput = "Blah blah blah"
        txtCertain = strOutput
    End Sub
    If you can clarify what you have, and what you need, more help might be forthcoming.
    10% of magic is knowing something that no-one else does. The rest is misdirection.

Posting Permissions

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