|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Help with VB and MS Access Database?
Is there any particular way to have a picture box that cycles through images based on whatever item is currently being selected in the form?
For example, I have a form that is populated through various textboxes. Each textbox contains information about a product from a store (name, price, item no, category etc etc). All the information is linked to a MS Access database. On this form, I have two buttons that cycle through each product (forwards and backwards). Is there anyway that I can make the picturebox change in accordance with the item being selected? I have the pictures currently in a separate folder from the Access DB folder. |
|
#2
|
|||
|
|||
|
If the form is within the Database the Data is located then :
Public Sub FieldName_AfterUpdate() If FieldContainingDescription = "ItemName" Then FieldContainingPicture.ControlSource = FieldContainingDescription.Column(ColumnNumber) End If End Sub or Public Sub FieldName_AfterUpdate() If FieldContainingDescription = "ItemName" Then FieldContainingPicture.ControlSource = Dlookup("FieldContainingPicture","Table","DesrciptionName=" & FieldContainingDescription) End If End Sub Have not as yet tried External links to Databases, but note that Excel and Outlook do work. |
![]() |
| Viewing: Dev Articles Community Forums > Databases > Microsoft Access Development > Help with VB and MS Access Database? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|