UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome Guest ( Log In | Register )

2 Pages V  < 1 2  
Reply to this topicStart new topic
> Making a form with Table values    
 
   
dromorkid
post 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)
Attached File  JobSetUp.zip ( 80.05K ) Number of downloads: 1
 
Go to the top of the page
 
+
mike60smart
post Dec 1 2008, 01:03 PM
Post #22

UtterAccess VIP
Posts: 8,450
From: Dunbar,Scotland



Hi

I think what you are after is called "Cascading ComboBox's"

See this site for an example

Mike
Go to the top of the page
 
+
dromorkid
post 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.
Go to the top of the page
 
+
mike60smart
post 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
Go to the top of the page
 
+
dromorkid
post 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.
Go to the top of the page
 
+
mike60smart
post 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)
Attached File  JobSetUp.zip ( 44.76K ) Number of downloads: 4
 
Go to the top of the page
 
+
dromorkid
post 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.
Go to the top of the page
 
+
mike60smart
post 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
Go to the top of the page
 
+
dromorkid
post 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 the top of the page
 
+

2 Pages V  < 1 2
Thank you for your support! Reply to this topicStart new topic

Jump To Forum:
 



RSS Go to Top  ·  Lo-Fi Version Time is now: 19th May 2013 - 09:56 PM