Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Combo box selection and opening form afterwards

Status
Not open for further replies.

djenkins728

Programmer
Aug 2, 2007
7
US
Okay I'm new and frustrated and tired, so please I hope you can help. I already viewed Utterangel's db on cascading combo boxes and it helped a lot. What I don't understand is --on my form after the user selects the cbo_calledby, cbo_ship, and cbo_dept how can I get the cbo_hull to work (which is named call-intype) and then send the data to my frm_maininfofilter for either viewing or printing? I've included the code I have so far. Again thanks and any help is appreciated.

Private Sub cbo_Calledby_AfterUpdate()
With Me![cbo_deptselect]
If IsNull(Me!cbo_Calledby) Then
.RowSource = " "

Else
.RowSource = "Select DISTINCT [dept] " & _
"From tbl_MainInfo " & _
"Where [calledby_id]=" & Me!cbo_Calledby
End If

Call .Requery
End With
End Sub
Private Sub cbo_deptselect_AfterUpdate()
With Me![cbo_shipselect]
If IsNull(Me!cbo_deptselect) Then
.RowSource = " "
Else
.RowSource = "Select DISTINCT [ship] " & _
"From tbl_MainInfo " & _
"Where [dept] like '*" & Me!cbo_deptselect & "*'"
End If
Call .Requery
End With
End Sub
Private Sub cbo_Hull_AfterUpdate()
With Me![cbo_Calledby, cbo_deptselect, cbo_shipselect]
If IsNull(Me!cbo_shipselect) Then
.RowSource = " "
Else
.RowSource = "Select DISTINCT [Call-InType] " & _
"From tbl_MainInfo " & _
"Where [ship]=" & Me!cbo_shipselect
End If
Call .Requery
End With
End Sub
Private Sub cbo_shipselect_AfterUpdate()
With Me![cbo_Hull]
If IsNull(Me!cbo_shipselect) Then
.RowSource = " "
Else
.RowSource = "Select DISTINCT [Call-InType] " & _
"From tbl_MainInfo " & _
"Where [ship]=" & Me!cbo_shipselect
End If
Call .Requery
End With

End Sub

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top