Results 1 to 2 of 2
  1. #1
    shabbaranks is offline Competent Performer
    Windows 7 32bit Access 2007
    Join Date
    Oct 2011
    Posts
    162

    Using VBA and input boxes to select from table

    Hi all,



    after a bit of help as to how I get my vba code to pop up input boxes and store whats input to query a table. I dont really know what I am doing so someone to assist would be appreciated. Here's my current code which prompts the user for thier choices

    Code:
    Private Sub TotalHours_btn_Click()
    Dim strInput1 As String
    Dim strInput2 As String
    Dim strMsg1 As String
    Dim strMsg2 As String
    
    strMsg1 = "Enter the name of the client you want total hours for"
    strMsg2 = "Enter the name of the person you want total hours for - leave blank for all employees"
    strInput1 = InputBox(Prompt:=strMsg1, title:="Select Client")
    strInput2 = InputBox(Prompt:=strMsg2, title:="Select Employee")
    docmd.RunSQL Select from TimesheetTable where
    Am I far from the tree??? Thanks

  2. #2
    shabbaranks is offline Competent Performer
    Windows 7 32bit Access 2007
    Join Date
    Oct 2011
    Posts
    162
    Am I going about this the right way -or should I be using a form to do this?

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Multiple Multi-select boxes on one form
    By bujaman in forum Forms
    Replies: 8
    Last Post: 01-20-2012, 01:48 PM
  2. Replies: 1
    Last Post: 10-08-2011, 11:15 PM
  3. 2 multi select list boxes on one search form
    By woodey2002 in forum Forms
    Replies: 2
    Last Post: 11-05-2010, 12:44 PM
  4. Multi-select List Boxes
    By Rawb in forum Programming
    Replies: 6
    Last Post: 09-21-2010, 09:02 AM
  5. Replies: 8
    Last Post: 09-24-2009, 02:56 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums