dataheadache
Registered User.
- Local time
- Today, 16:05
- Joined
- Feb 18, 2004
- Messages
- 28
I've created a form in my database that has two combo boxes - one called cboID (which gets data from my table field called DiscID) and the other cboSide (which gets data from the table field DiscSide) - I want to update the cboSide combobox so it shows only DiscSides that were used on a particular DiscID
I have put the following in the cboID RecordSource in the AfterUpdate event:
Private Sub cboID_AfterUpdate()
Dim cboSide2 As String
cboSide2 = "SELECT DISTINCT [recordedtbl].[DiscSide] " & _
"FROM recordedtbl " & _
"WHERE [DiscID] = " & Me.cboID.Value
Me.cboSide.RowSource = cboSide2
Me.cboSide.Requery
End Sub
but now every time I run the report I get a data mismatch - what is wrong?
I have put the following in the cboID RecordSource in the AfterUpdate event:
Private Sub cboID_AfterUpdate()
Dim cboSide2 As String
cboSide2 = "SELECT DISTINCT [recordedtbl].[DiscSide] " & _
"FROM recordedtbl " & _
"WHERE [DiscID] = " & Me.cboID.Value
Me.cboSide.RowSource = cboSide2
Me.cboSide.Requery
End Sub
but now every time I run the report I get a data mismatch - what is wrong?