timhans
Programmer
- Jun 24, 2009
- 75
Hello. I have a switch board(Not made with wizard)it has a picture on it, would very much like for picture to change when switch board is opened. Found this on the form this morning, by ZiggyS1 answering other question
[Private Sub Form_Current()
Dim path As String
'The Me.Filename is the name of a text box that holds the filename. As you change records if you have the field filled in with a valid filename the image will appear.
If Me.Filename <> "" Then
path = "C:\Users\Documents\Pictures\pictures"
Me.Image1.Picture = path & Me.Filename
End If
End Sub]
Works good!
I have created a table with the names of my pictures and a combobox populated by a select statement from this table.
Need help in how to auto move to next position in combobox on, on current event(or some better idea), attempting
If Me.Filename.ItemData
Then n = n+1
path = "C:\Users\Documents\Pictures\pictures"
Me.Image1.Picture = path & Me.Filename.ItemData
End If
not working, get mismatched data type. Thanks
[Private Sub Form_Current()
Dim path As String
'The Me.Filename is the name of a text box that holds the filename. As you change records if you have the field filled in with a valid filename the image will appear.
If Me.Filename <> "" Then
path = "C:\Users\Documents\Pictures\pictures"
Me.Image1.Picture = path & Me.Filename
End If
End Sub]
Works good!
I have created a table with the names of my pictures and a combobox populated by a select statement from this table.
Need help in how to auto move to next position in combobox on, on current event(or some better idea), attempting
If Me.Filename.ItemData
path = "C:\Users\Documents\Pictures\pictures"
Me.Image1.Picture = path & Me.Filename.ItemData
End If
not working, get mismatched data type. Thanks