/* */

Sunday, May 8, 2011

Re: [belajar-access] tanya multi query by combo box [1 Attachment]

[Attachment(s) from Aksan Kurdin included below]

Combo box tidak memiliki fiture multi select.
List box punya.



Jadi keinginan anda bisa digantikan oleh listbox.

Adapun mengenai code yang bisa mengembalikan multiselected item adalah sebagai berikut:





Fungsi GetFilterString adalah buatan sendiri, ini dimaksudkan untuk mengembalikan string berupa kriteria yang bisa digabungkan dalam query teks.
pertama kali, saat command button ditekan, form hanya akan menampilkan di immediate window pilihan yang ditentukan, digabung, dan dipisahkan dengan koma.
hal itu bisa dilaksanakan dengan cara iterasi terhadap obyek var_item:

me.list0.column(1, var_item).

artinya ambil nilai var_item untuk indeks no 1. (indeks 0 adalah indeks pertama).


dari contoh ini anda bisa kembangkan untuk membentuk teks query seperti:

select * from table where pilihan in (GetFilterString)


aksan kurdin



On 5/7/2011 3:18 PM, Rusmanto wrote:
 

Assalamuallaikum,

Temen2 saya ada masalah gimana caranya membuat multi Query di Form berdasarkan pilihan di combo Box:

contoh:

SELECT DISTINCT TblProduction.dari
FROM TblProduction
WHERE (((TblProduction.dari) Like (IIf([Forms]![FormPIT]![cbxdari] Is Null,"*",[Forms]![FormPIT]![cbxdari]))))
ORDER BY TblProduction.dari;

Tapi ini hanya bisa pilih satu pilihan saja, gimana caranya kalau saya mau pilih 2 atau lebih, semacam disorot atau pilih menggunakan select+Ctrl .

kiranya ada temen2 yang bisa bantu, sebelumnya terimakasih banyak.


salam
Rusman
Manado




*** This e-mail and attachments it might contains has passed internal anti-virus check but it is suggested for you to re-scan with your anti-virus ***

Disclaimer Notice :
This message and any attachment contains information intended only for the use of the addresee named above. It may also be confidential and/or privileged. 
If you are not the intended recipient of this message you are herby notified that you must not disseminate, copy or take any action in reliance on it. Please delete the message and notify the sender. 
Opinions, conclusions and other information in this message that do not relate to the official business of Archipelago Resources Plc., Archipelago Resources Pty Ltd.,
PT Meares Soputan Mining, PT Tambang Tondano Nusajaya shall be understood as neither given nor endorsed by them.


Attachment(s) from Aksan Kurdin

1 of 1 File(s)


__._,_.___


SPAM IS PROHIBITED



Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___

No comments:

Post a Comment