Help with ComboBox List.

  • Thread starter Thread starter Ayo
  • Start date Start date
A

Ayo

I need help with something. I don't know if it is possible. I have 2
cmbBoxes and two cmdButtons. The cmdButtons are surposed to run FindRecord
and FindNext methods when clicked based on the search criteria set in one of
the cmbBoxes.

What I want to do is bound one of the cmbBoxes to the table's fields and
the second cmbBox to the list of, unique, data in each in each field.

So, this is how is surpose to work, I select a field name in cmbBox1 and I
want the available selection in cmbBox2 to be the list of, unique, data in
the corresponding field selected in cmbBox1. Once the selection is made, I
would click on the FindRecord cmdButton to search through the database using
cmbBox2 as my search criteria.

I can figure out the cmdButton codes. I just need help with the cmbBoxes. If
anone out there knows how I can do this please help.

Thank you.
Ayo
 
Hi Ayo,

You might want to try this sample, created by Access MVP Allen Browne:

Search criteria
http://allenbrowne.com/ser-62.html

I think that comes pretty close to what you have asked for. Alternatively,
you might want to try these samples out, listed in order of complexity, from
easiest to a bit more involved:

QBF Examples
http://home.comcast.net/~tutorme2/samples/customdialogbox.zip
http://home.comcast.net/~tutorme2/samples/elements.zip
http://home.comcast.net/~tutorme2/samples/Chap08QBF.zip


Tom Wickerath
Microsoft Access MVP
https://mvp.support.microsoft.com/profile/Tom
http://www.access.qbuilt.com/html/expert_contributors.html
__________________________________________
 
Thanks.
Need help with something else, hope you can help. I have 2 cmbBoxes and I
want one to update the other.
cmbBox1:
Row Sorce Type = Field List
Row Source = Invoice Tracker

cmbBox2:
Row Sorce Type = Table/Query
Row Source = SELECT DISTINCT [Invoice Tracker].cmbTrackerFields.value FROM
[Invoice Tracker] ORDER BY [Invoice Tracker].cmbTrackerFields;

What I want to do is, when I select a field title in cmbBox1, I want cmbBox2
to be updated with a list of all (distinct) the values in the field. I think
I am getting the Row Source property value wrong.
Can you take a look and tell me what I am doing wrong? Thanks.
 
Hi Ayo,

Take a look at these two examples, and see if they are helpful:

Limit content of combo/list boxes
http://www.mvps.org/access/forms/frm0028.htm

How to Synchronize Two Combo Boxes on a Form
http://support.microsoft.com/kb/209595


In both examples, you will see that the AfterUpdate event procedure for the
first combo box is used to set the Row Source for the second combo box.


Tom Wickerath
Microsoft Access MVP
https://mvp.support.microsoft.com/profile/Tom
http://www.access.qbuilt.com/html/expert_contributors.html
__________________________________________
 
Back
Top