Hi guys,
I have a problem with Microsoft Access 2007, in particular a VLB code in the events procedure which I am trying to configure so my query works.
Basically a client has asked me to create a database for them in Access containing 2 lists. One list is a huge list of tropical fish, whilst the other list contains the latin names of these fish. Ideally what they want is to be able to run a query or report and on selection of the Tropical fish, they want the latin name to show up as a result.
I know it has something to do with "row source" and "combo-boxes" and then to add a code into the "VLB" but it doesn't seem to be working.
Here are the names of the lists:
"Common"
Field Name = "COMMON NAME"
"Latin"
Field Name = "LATIN NAME"
The two lists are combined to create "Movements Record"
And here is the Microsoft Visual Basic code im using as my Events Procedure:
Code:
Private Sub Common_Name_AfterUpdate()
' Update the row source of the Latin_Name combo box
' when the user makes a selection in the Common_Name
' combo box.
Me.Latin_Name.RowSource = "SELECT LATIN NAME FROM" & _
" Latin WHERE Common = " & _
Me.Common_Name & _
" ORDER BY LATIN NAME"
Me.Latin_Name = Me.Latin_Name.ItemData(0)
End Sub
Im not even sure this code is correct?
If somebody could point me in the right direction I would be extremely thankful and delighted.
Kind Regards,
Chris Dickinson.