Show Bid Request 
	 
				
		
			
				
					
						
							VB6 code to set up an Array in a data_report 
							Bid Request Id: 29848 
							
						 | 
						
							
						 | 
					 
				 
			 | 			
		 
		
			
				
					
						
							
								
									| 
										
										Posted by: | 
									
										 infomed (37 ratings) 
										(Software buyer rating 10 ) 
									 | 
								 
								
									| 
										Non-action Ratio: | 
									
										Very Good - 14.81%
									 | 
								 
								
									
										Buyer Security Verifications:  | 
									
										
				Good
									 | 
								 
								
									| 
										Approved on: | 
									
										Oct 4, 2002 8:33:33 PM EDT
									 | 
								 
								
									| 
										Bidding Closes: | 
									
										 Oct 18, 2002 8:34:24 PM EDT
									 | 
								 
								
									| 
										Viewed (by coders): | 
									
										 409 times
										
									 | 
								 
							 
						 | 
						
							
						 | 	
					 
					
						| 
							
						 | 
					 
				 
					
						
							
								
								 
								
									Description:
									 
									I need somebody to show me how to use the following code to build an array (I believe this is the best way to do this).
  I am pulling between zero and 50 times from a schedule database with the following code.
  Once I pull the recordset, I want to display the schedule, but can't figure out how to do it.
  What do I need to do this?  You can put code in the data_report, but that's it. 
  The code below will basically put one row into my data_report, but if there are 50 recordsets, only the last one appears.  How do I have controls made on the fly to fit the number of records returned, without having to set up tons of labels at design time?
 
  Thanks Jon
 
 
 
  Private Sub DataReport_Initialize()
  'get schedule     Dim cnn1 As ADODB.Connection     Dim strQry As String     Dim rs As ADODB.Recordset          strQry = "Select * from Scheduling Where Scheduling.Date Like '" & p_ScheduleDate & "' Order By Scheduling.Date"
      Set cnn1 = New ADODB.Connection     cnn1.ConnectionString = g_ADOschedule     cnn1.Open
      Set rs = GetRecordSet(cnn1, strQry) 'get the recordset
            Me.Sections(1).Controls(1).Caption = p_ScheduleTitleDate
          Do While rs.EOF = False             If Not IsNull(rs!Date) Then                 VisitTime = Format((rs!Date), "hh:mm AMPM")             Else                 VisitTime = ""             End If                          If Not IsNull(rs!name) Then                 name = rs!name             Else                 name = ""             End If                          If Not IsNull(rs!Phone) Then                 Phone = rs!Phone             Else                 Phone = ""             End If                          If Not IsNull(rs!VisitType) Then                 VisitType = rs!VisitType             Else                 VisitType = ""             End If                          If Not IsNull(rs!Booker) Then                 Booker = Left(rs!Booker, 10) & " " & Format(rs!DateBooked, "mm/dd/yy")             Else                 Booker = ""             End If                      rs.MoveNext         Loop
           Set cnn1 = Nothing     Set rs = Nothing          	Me.Sections(3).Controls(1).Caption = VisitTime 	Me.Sections(3).Controls(2).Caption = name 	Me.Sections(3).Controls(3).Caption = Phone 	Me.Sections(3).Controls(4).Caption = VisitType 	Me.Sections(3).Controls(5).Caption = Booker
  End Sub
  
								 
									
									
												Deliverables: 1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done.
  2) Complete ownership and distribution copyrights to all work purchased.
 
  									
									 
										 
										Platform: 
										win 
										 
										 
										Special Conditions / Other: 
										I'm not looking for anything fancy, just some good and well commented code which will turn this one rs into 50, if need be. 
										 
								 
										
										Remember that contacting the other party outside of the site (by email, phone, etc.) on all business projects < $500 (before the buyer's money is escrowed) is a violation of both the software buyer and seller agreements.
We monitor all site activity for such violations and can instantly expel transgressers on the spot, so we thank you in advance for your cooperation.  
If you notice a violation please help out the site and report it. Thanks for your help. 
										 
							 | 
						 
					 
			 | 
		 
		
			| 
			Bidding/Comments:
			 | 
		 
		
			All monetary amounts on the site are in United States dollars. 
			Rent a Coder is a closed auction, so coders can only see their own bids and comments.  Buyers can view every posting made on their bid requests. | 
		 
			
				
				 
				
					
					
					See all rejected bids (and all comments)
					 
					
					
				
				 
				 
					 
						 |   
			 |