2 combobox link each other.. please help

cikwan82

Registered User.
Local time
Tomorrow, 00:17
Joined
Dec 10, 2013
Messages
45
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..
 

Attachments

If possible please make some video tutorial for this case.. this tutorial very important for me.. i really need help...
Thanks.
 
Table TAnalisis does not have a field with the name IDstatus.
If your link table together, then the link fields have to be of same type, (you can't link text and numbers).
 
Thank you my friend.. its working now... you are awesome..:)
 
This is my simple form tutorial.. i want to share with other friends.. thank you all for support me..:)
 

Attachments

Users who are viewing this thread

Back
Top Bottom