Build a query for the 2nd combo box source. Use the first combo box as
criteria for the query.
You will need to refresh the query on opening the 2nd combo box.
Would you mind explaining how to do that for me? (sorry im still new to access)
Thanks
> Build a query for the 2nd combo box source. Use the first combo box as
> criteria for the query.
[quoted text clipped - 11 lines]
> > I have been trying for hours to ge tthis to work so any help would be
> > greatly appreciated! Thanks
KARL DEWEY - 01 Jul 2005 17:49 GMT
Build a query with criteria --
[Forms]![YourForm]![YourComboBox1]
Create a macro named RequeryComboBox2 with action Requery.
Open your form in DESIGN view. Right click the 2nd combobox. Select
Properties.
For Row Source select your query.
For On Enter select Macro.RequeryComboBox2.
Save.
> Would you mind explaining how to do that for me? (sorry im still new to access)
> Thanks
[quoted text clipped - 14 lines]
> > > I have been trying for hours to ge tthis to work so any help would be
> > > greatly appreciated! Thanks
Joel - 02 Jul 2005 17:58 GMT
When I make the macro with the Requery action, what do I put as the control
name? No matter what I put in there, whenever I got back to my form and click
on combobox 2 it says "There is no field named "(whatever is in the control
name)" in the current record" and if i leave it blank then I cant even click
on combobox 2.
And suggestions?
Thanks
> Build a query with criteria --
> [Forms]![YourForm]![YourComboBox1]
[quoted text clipped - 26 lines]
> > > > I have been trying for hours to ge tthis to work so any help would be
> > > > greatly appreciated! Thanks
Joel - 01 Jul 2005 17:56 GMT
Ok well I got from Karl's reply.
Here is what I did.
1st I made a Query For everything I needed
Then
In the 1st combo box I used the after update function and wrote this code:
Private Sub Combo1_AfterUpdate()
If combo1 = "Site A" then
combo2.RowSource = "QuerySiteA"
Else
End If
End Sub
If anyone knows a better/easier way to do this, Please let me know =)
Thank You Karl
> Would you mind explaining how to do that for me? (sorry im still new to access)
> Thanks
[quoted text clipped - 14 lines]
> > > I have been trying for hours to ge tthis to work so any help would be
> > > greatly appreciated! Thanks