Visual Basic Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingVisual Basic Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old February 25th, 2005, 08:11 AM
solig solig is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Posts: 33 solig User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 29 m 8 sec
Reputation Power: 5
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

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingVisual Basic Programming > Populate List Box from Combo in DAP


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway