3 Replies - 782 Views - Last Post: 12 January 2016 - 12:48 PM

#1 dbacode  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 07-January 16

display combobox selection

Posted 11 January 2016 - 03:33 PM

I created a form where it takes all the field from a table and displays.
than I created a combobox on header of the form and fill distinct value from one of the field of that table.
I wrote a code in combobox change() property which opens and query (query has condition will display record which matches with the combobox)

Every thing works fine except when I select selection from combobox to display the result instead of displayin in that form it opens new datasheet view and display the result.

I want to display the result in the same form in Tabular format.

please let me know if it is possible

Is This A Good Question/Topic? 0
  • +

Replies To: display combobox selection

#2 andrewsw  Icon User is online

  • say what now
  • member icon

Reputation: 6408
  • View blog
  • Posts: 25,889
  • Joined: 12-December 12

Re: display combobox selection

Posted 11 January 2016 - 03:45 PM

You would add a subform to the form, using a Default View of either DataSheet or Continuous Form, then use the change event to set the RecordSource of the subform to the query or SQL statement that refers to the combobox.
Was This Post Helpful? 0
  • +
  • -

#3 dbacode  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 07-January 16

Re: display combobox selection

Posted 12 January 2016 - 12:30 PM

So attach is Database1.zip file which has Database1.accdb database.
If you open it you will see 1 table, 3 queries ,two frm, 1 macro.

By Default it should open MainFrm so double click on mainform to open it than you can click StudenFrm which will show you another form.
In the new opened form which shows the student list there is combo box on the top.
If you select the value from combo box (for e.g. north) it does open all the records which are in north region but....
Problem NO. 1 : it opens in separate datasheet window instead of on the same form in tabular format like you see in design.

how to get display on the form in same window instead of separate datasheet ?

Attached File(s)


Was This Post Helpful? 0
  • +
  • -

#4 andrewsw  Icon User is online

  • say what now
  • member icon

Reputation: 6408
  • View blog
  • Posts: 25,889
  • Joined: 12-December 12

Re: display combobox selection

Posted 12 January 2016 - 12:48 PM

Topics merged. Do not start a new topic for the same question (especially when there has already been some response).
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1