Good Morning:
I have a form where I am trying to create cascading combo boxes. I have done this before but I am getting the following error that is throwing me off:
[code=text] Procedure declaration does not match description of event or procedure having the same name. [/code]
Basically have three tables:
One for the Division location:
tblDivision
DivisionID = Autonumber
DivisionName = Text
One for the Segment:
tblSegment
SegmentID = Autonumber
SegmentName = Text
One for the Unique Locations (Many to Many Relationship Tbl):
tblLocationsMM
JtnLocationsID = Autonumber
DivisionIDFK = Number (Foreign Key)
SegmentIDFK = Number (Foreign Key)
WrkRegIDFK = Number (Foreign Key)
CreditRegIDFK= Number (Foreign Key)
BrokerTypeIDFK= Number (Foreign Key)
I followed the cascading script method posted on this website and created a form, put 3 combo boxes on it:
cboDivision (bound on column 1, row source tblDivision, column count set to 2, Column Widths set @ 0";1")
cboSegment (bound on column 1, row source blank, column count set to 2, Column Widths set @ 0";1")
cboWrkReg (bound on column 1, row source blank, column count set to 2, Column Widths set @ 0";1")
In the after update event of my cboDivision I placed the following code:
[code=vb]
Private Sub CboDivision_Aft erUpdate()
'When the Division is selected, the appropriate Segment list will
'display in the drop down list of CboSegment
With Me![cboSegment]
If IsNull(Me!cboDi vision) Then
.RowSource = ""
Else
.RowSource = "SELECT DISTINCT tblSegment.Segm entID, " & _
"tblSegment.Seg mentName " & _
"FROM TblLocationsMM INNER JOIN tblSegment " & _
"ON TblLocationsMM. SegmentIDFK = tblSegment.Segm entID " & _
"WHERE [DivisionIDFK]=" & Me!cboDivision
End If
Call .Requery
End With
End Sub
[/code]
Any ideas why I am getting an error? Any ideas would be helpful.
Thanks,
Keith.
I have a form where I am trying to create cascading combo boxes. I have done this before but I am getting the following error that is throwing me off:
[code=text] Procedure declaration does not match description of event or procedure having the same name. [/code]
Basically have three tables:
One for the Division location:
tblDivision
DivisionID = Autonumber
DivisionName = Text
One for the Segment:
tblSegment
SegmentID = Autonumber
SegmentName = Text
One for the Unique Locations (Many to Many Relationship Tbl):
tblLocationsMM
JtnLocationsID = Autonumber
DivisionIDFK = Number (Foreign Key)
SegmentIDFK = Number (Foreign Key)
WrkRegIDFK = Number (Foreign Key)
CreditRegIDFK= Number (Foreign Key)
BrokerTypeIDFK= Number (Foreign Key)
I followed the cascading script method posted on this website and created a form, put 3 combo boxes on it:
cboDivision (bound on column 1, row source tblDivision, column count set to 2, Column Widths set @ 0";1")
cboSegment (bound on column 1, row source blank, column count set to 2, Column Widths set @ 0";1")
cboWrkReg (bound on column 1, row source blank, column count set to 2, Column Widths set @ 0";1")
In the after update event of my cboDivision I placed the following code:
[code=vb]
Private Sub CboDivision_Aft erUpdate()
'When the Division is selected, the appropriate Segment list will
'display in the drop down list of CboSegment
With Me![cboSegment]
If IsNull(Me!cboDi vision) Then
.RowSource = ""
Else
.RowSource = "SELECT DISTINCT tblSegment.Segm entID, " & _
"tblSegment.Seg mentName " & _
"FROM TblLocationsMM INNER JOIN tblSegment " & _
"ON TblLocationsMM. SegmentIDFK = tblSegment.Segm entID " & _
"WHERE [DivisionIDFK]=" & Me!cboDivision
End If
Call .Requery
End With
End Sub
[/code]
Any ideas why I am getting an error? Any ideas would be helpful.
Thanks,
Keith.
Comment