Hi,
i already try to create 2 combobox with 1 textbox where there are link each others.. i try follow and edit some tutorial from here still not working.. please help me brothers..
i have status combobox (combo0), analisis combobox(combo6) and price text box (text8). i don't know what wrong with my sql.
Here i attach the file (two table) with the code..
Note : Harga=Price
..................................................................................................
Option Compare Database
Private Sub Combo0_LostFocus()
'Check if curent record is a new adn that the states combo has not changed
'warn user and determine desired action
'Reset suburbs combo and text box if user wishes to change states
If Me.NewRecord = True Then
Me.Combo6.Requery
Exit Sub
Else
Me.Combo6.RowSource = "SELECT TAnalisis.IDHarga, TAnalisis.Analisis, TAnalisis.Harga, TStatus.IDstatus " & _
"FROM TStatus INNER JOIN TAnalisis ON TStatus.IDstatus = TAnalisis.IDstatus " & _
"WHERE (((TStatus.IDstatus)=[forms]![Borang]![combo0])) ORDER BY TAnalisis.Analisis;"
Me.Combo6 = 0
Me.Text8 = Null
End If
Me.Combo6.Requery
End Sub
Private Sub Combo6_Change()
'Force Suburbs combo to drop down when user start typing
If Me.Combo6.SelStart = 1 Then
Me.Combo6.Dropdown
End If
Me.Text8 = Me.Combo6.Column(2)
End Sub
Private Sub Combo6_GotFocus()
'Force Suburbs combo to drop down
If Me.Combo6 = 0 And Not IsNull(Me.Combo0) Then
Me.Combo6.Dropdown
End If
End Sub
.........................................................................
Thank first for anybody can help me..
i already try to create 2 combobox with 1 textbox where there are link each others.. i try follow and edit some tutorial from here still not working.. please help me brothers..
i have status combobox (combo0), analisis combobox(combo6) and price text box (text8). i don't know what wrong with my sql.
Here i attach the file (two table) with the code..
Note : Harga=Price
..................................................................................................
Option Compare Database
Private Sub Combo0_LostFocus()
'Check if curent record is a new adn that the states combo has not changed
'warn user and determine desired action
'Reset suburbs combo and text box if user wishes to change states
If Me.NewRecord = True Then
Me.Combo6.Requery
Exit Sub
Else
Me.Combo6.RowSource = "SELECT TAnalisis.IDHarga, TAnalisis.Analisis, TAnalisis.Harga, TStatus.IDstatus " & _
"FROM TStatus INNER JOIN TAnalisis ON TStatus.IDstatus = TAnalisis.IDstatus " & _
"WHERE (((TStatus.IDstatus)=[forms]![Borang]![combo0])) ORDER BY TAnalisis.Analisis;"
Me.Combo6 = 0
Me.Text8 = Null
End If
Me.Combo6.Requery
End Sub
Private Sub Combo6_Change()
'Force Suburbs combo to drop down when user start typing
If Me.Combo6.SelStart = 1 Then
Me.Combo6.Dropdown
End If
Me.Text8 = Me.Combo6.Column(2)
End Sub
Private Sub Combo6_GotFocus()
'Force Suburbs combo to drop down
If Me.Combo6 = 0 And Not IsNull(Me.Combo0) Then
Me.Combo6.Dropdown
End If
End Sub
.........................................................................
Thank first for anybody can help me..