My Assistant
![]() ![]() |
|
|
Dec 1 2008, 12:52 PM
Post
#21
|
|
|
UtterAccess Veteran Posts: 373 |
I should also attach what I have done, which is a duplicate of yours. You will notice in the table 'SubDivisionInfo' that I have associated the relative Division to the Subdivision. This can be seen also when you drop down the combobox for SubDivision in 'cmboSubDivision_ID'. All 1000's are for General Conditions, 2000's for Site Work, etc.
Attached File(s)
|
|
|
|
Dec 1 2008, 01:03 PM
Post
#22
|
|
|
UtterAccess VIP Posts: 8,450 From: Dunbar,Scotland |
|
|
|
|
Dec 1 2008, 01:28 PM
Post
#23
|
|
|
UtterAccess Veteran Posts: 373 |
With the code below I can show values in a combo box based on the value selected in another combo box.
CODE Private Sub Division_ID_AfterUpdate() SubDivision_ID = Null SubDivision_ID.Requery SubDivision_ID = Me.SubDivision_ID.ItemData(0) End Sub Private Sub Form_Current() SubDivision_ID.Requery End Sub Private Sub Form_Load() If IsNull(Division_ID) Then Division_ID = Me.Division_ID.ItemData(0) Call Division_ID_AfterUpdate End If End Sub My issue is that I can't do it for combo boxes on 2 different forms. The example you gave me isn't clear what I should do as its different coding to what I used above. |
|
|
|
Dec 1 2008, 04:34 PM
Post
#24
|
|
|
UtterAccess VIP Posts: 8,450 From: Dunbar,Scotland |
Hi
I think we are talking at cross purposes here? Are saying that if you select a Dividion you only want to see SubDivisions associated with the Selected SubDivision? If this is true then you need to use Cascading ComboBox's Mike |
|
|
|
Dec 1 2008, 04:48 PM
Post
#25
|
|
|
UtterAccess Veteran Posts: 373 |
QUOTE Are saying that if you select a Dividion you only want to see SubDivisions associated with the Selected SubDivision? Yes, but I think you meant to say ..... Subdivisons associated with the selected Division ....not SubDivision, right? Anyway, this is what I want to do. But I don't know how to refer to the SubDivision in the VB of the AfterUpdate function of the Division_ID in subform JobDivisionInfo, when it is on a different subform. I'm not familiar with the Me! and the Forms! code. |
|
|
|
Dec 1 2008, 05:22 PM
Post
#26
|
|
|
UtterAccess VIP Posts: 8,450 From: Dunbar,Scotland |
Hi
See the example attached The Form that opens allows you to select a Division using the First ComboBox The second ComboBox allows you to see the SubDivisions associated with the Division Hope this helps? Mike
Attached File(s)
|
|
|
|
Dec 1 2008, 06:04 PM
Post
#27
|
|
|
UtterAccess Veteran Posts: 373 |
Thanks for taking the time yet again to do that example out for me.
I have this example already done unfortunately. My problem is not with creating this when they are on the same form. Its when they are on two different subforms on the main form that I can't do it. As you can see the Division_ID is on subform 'JobDivisionInfo subform' and the SubDivision_ID is on subform 'JobSubDivisionInfo subform'. I don't know how to reference the source outside the form I'm on I'm calling it from. Its got to do with the Me.Form code. I am clueless on it. |
|
|
|
Dec 1 2008, 06:25 PM
Post
#28
|
|
|
UtterAccess VIP Posts: 8,450 From: Dunbar,Scotland |
Hi
I am not sure you can use a cascading Combo on different Forms?? Maybe one of the Gurus will be able to help? Post your question in a new thread and you may get an answer My 2 shilloings worth Mike |
|
|
|
Dec 2 2008, 07:27 AM
Post
#29
|
|
|
UtterAccess Veteran Posts: 373 |
Ok, I'll post it in a new thread. Thanks again Mike. been a great help! I'll be in touch again soon, I'm sure!!
|
|
|
|
![]() ![]() |
|
Go to Top · Lo-Fi Version | Time is now: 19th May 2013 - 09:56 PM |