Hi,
Well I spent too much time trying to resolve this- but I am just not seeing my mistake. Any assistance you provide would be greatly appreciated.
I have a main form, called Edit_frm_2, with a tab control called edit_control, which has a combo box -called LOB_txt. The LOB_txt, on the second tab of the edit_control, is what I am trying to change its value -based on another field. So here is my code.
Once I click on lob_txt, the above routine runs but nothing changes in the la_txt field. I opened the select_LA query only to find the 'Forms!Edit_frm_2!LOB_txt.Value' empty.I dont think i should be referencing the tab control.
Thanks in advance.
Well I spent too much time trying to resolve this- but I am just not seeing my mistake. Any assistance you provide would be greatly appreciated.
I have a main form, called Edit_frm_2, with a tab control called edit_control, which has a combo box -called LOB_txt. The LOB_txt, on the second tab of the edit_control, is what I am trying to change its value -based on another field. So here is my code.
Code:
Private Sub lob_txt_Click()
Dim new_sql As String
new_sql = " SELECT LA " & _
" FROM LA_tbl inner join lob_tbl " & _
" ON LA_tbl.lab_id=lob_tbl.lob_id " & _
" Where Ucase(lob_tbl.lob)=ucase('" & Forms!Edit_frm_2!LOB_txt.Value & "') " & _
" ORDER BY BA "
CurrentDb.QueryDefs("select_LA").sql = new_sql
ba_txt.Requery
MsgBox (" LOB_txt : " & LOB_txt.Value)
End Sub
Thanks in advance.