I need help with the Search form. i created a Combo box for the search and also a Cmd botton to open the main form. That main form have a subform that is the one that actually contain the information that i'm searching for. The main form just show some other information that its link with that subform. Ok Here is my Code.
Private Function basOrderby(col As String, xorder As String) As Integer
Dim strSQL As String
strSQL = "SELECT DISTINCTROW NUM_RECORD, NOMBRE_EST "
strSQL = strSQL & "FROM TABLA_EST "
strSQL = strSQL & "ORDER BY " & col & " " & xorder
Me!lstSearch.RowSource = strSQL
Me!lstSearch.Requery
End Function
Private Sub CmdLunch_Click()
DoCmd.OpenForm "Form_Principal", , , _
"[TABLA_EST.NUM_RECORD]=" & "'" & Me.lstSearch.Column(0) & "'"
i don't know if this help but my Subform name is FrmPerfil Subform.
I'm including my Db
Private Function basOrderby(col As String, xorder As String) As Integer
Dim strSQL As String
strSQL = "SELECT DISTINCTROW NUM_RECORD, NOMBRE_EST "
strSQL = strSQL & "FROM TABLA_EST "
strSQL = strSQL & "ORDER BY " & col & " " & xorder
Me!lstSearch.RowSource = strSQL
Me!lstSearch.Requery
End Function
Private Sub CmdLunch_Click()
DoCmd.OpenForm "Form_Principal", , , _
"[TABLA_EST.NUM_RECORD]=" & "'" & Me.lstSearch.Column(0) & "'"
i don't know if this help but my Subform name is FrmPerfil Subform.
I'm including my Db