Hello again
I like to change an picture based on selection from an combobox
in Combobox I would like to see just the title (column1) but the imagine to take data from column 2 - where is stored the path to imagine:
this is the code from VBA:
Code:
Private Sub Combo3_Change()
'Me.Image0.Picture = CurrentProject.Path & "\" & Me.Combo3.Column(2)
Me.Image0.Picture = Me.Combo3.Column(2)
End Sub
Private Sub Form_Load()
'Me.Combo3.RowSource = "SELECT imagini.imagineID, imagini.titlu, imagini.cale_imagine FROM imagini ORDER BY [titlu]"
Me.Combo3.RowSource = "SELECT imagini.imagineID, imagini.titlu," & Application.CurrentProject.Path & "\" & "[cale_imagine] AS Expr1 FROM imagini ORDER BY [titlu]"
End Sub
the error is on this line
Code:
Me.Combo3.RowSource = "SELECT imagini.imagineID, imagini.titlu," & Application.CurrentProject.Path & "\" & "[cale_imagine] AS Expr1 FROM imagini ORDER BY [titlu]"
syntax error missing operator.