Results 1 to 2 of 2
  1. #1
    drunkenneo is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Jun 2013
    Posts
    199

    Query passing to subform

    I have searched all over but not got any idea, Situation is i have a subform which is controlled by a query eg . Fname&" "& Lname as Name, order_number. and i have form which have combobox.



    When form opens the query works fine but when i search value order_number in combo box it gives the result but with ?Name in Name column.

    I know i can do this with Filter method, and rewriting the query, but i want to use it by passing the value in query of subform. Please Help.

  2. #2
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows XP Access 2003
    Join Date
    Aug 2013
    Posts
    7,862
    You can adjust the Row Source of your combobox. You can copy the SQL from the Combobox's property window and paste it into the form's load event so you can see it better. You can also use the Zoom feature in the proporty window for the Row Source.

    You can do something like

    Code:
    Dim strSQL As String
    strSQL = "SELECT * FROM tblMain"
    Me.cmbCombo.RowSource = strSQL

    In the form's load event

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

Similar Threads

  1. subform not passing value to table
    By Paintballlovr in forum Forms
    Replies: 2
    Last Post: 08-28-2013, 09:59 AM
  2. Replies: 2
    Last Post: 01-25-2013, 08:49 AM
  3. Replies: 2
    Last Post: 05-17-2012, 11:19 AM
  4. Replies: 3
    Last Post: 05-23-2011, 02:15 PM
  5. Passing focus to subform.....
    By smorelandii in forum Forms
    Replies: 3
    Last Post: 02-04-2011, 10:51 AM

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