|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Populate List Box from Combo in DAP
Hej,
I have a combo box and a list box , i have created in Data Access Pages , i want to populate the values of the listbox by selecting a value from the combo box , then after the values are populated in the list box , i want to choose a value from it and then goto another DAP where i can edit that record. It does not populate the values for the listbox at all... I have the code , it works fine in Forms but when i do this is DAP it does not work at all it gives me errors that makes no sense... below is the code ( i did not write this code bymyself but took it from somewhere) , its been 3 days now but i just cant get it to work anyway , anyone just show me the way (i have no experience in Visual Basic): On the Combo box's onafterupdate property: If IsNull(Me.cboPlants) Then Me.cboUnits = Null Me.cboUnits.Enabled = False Me.cboUnitsLocked = True Else Me.cboUnits.Enabled = True Me.cboUnits.Locked = False Me.cboUnits.Requery End If On a Button to generate the results : Dim rownum As String Dim myfilter As String If Me.[cboUnits].ItemsSelected.Count = 0 Then Exit Sub Else If For Each rownum In Me.[cboUnits].ItemsSelected myfilter = myfilter & "[Plant ID] = '" & Me.[cboUnits].Column(0, rownum) & "' OR " Next rownum If Right(myfilter, 3) = "OR" Then myfilter = Left(myfilter, Len(myfilter) - 4) Else End If DoCmd......(i could not open another record in DAP at all) best regards, solig |
![]() |
| Viewing: ASP Free Forums > Programming > Visual Basic Programming > Populate List Box from Combo in DAP |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|