Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Drill down using VB6

Status
Not open for further replies.

Waxaholic

Technical User
Jan 31, 2001
63
US
I created a drill-down in Access using a combobox and 2 listboxes. The combo would generate a listing in listbox1 and a doubleclick on an item in listbox1 would generate more info in listbox2. Now i am trying to learn how to do this very same thing in VB6 but am totally lost. I created a DED connection to the access data to be used for the drill down. I started off trying to use a DataCombo and 2 DataGrid's as part of the drill down. I am not sure if this is the ideal setup or not. I am having trouble binding the data correctly. The DataCombo only displays the first line of the database. I am lost here as what to do next. All my reference material have examples using ADODC controls but i don't want to have them on my form. Is it possible to just bind the DataGrid to the DataCombo? Excuse me if i am way off here but this is all new to me. Any help with the correct controls, setup, etc. would be invaluable.

Thank you,

Brian
 
-Waxaholic

I have done something similar and I also am new to VBScript and ASP (and a little JavaScript).

What I did was create a form on a page where the ACTION referenced the same page. So, when I submitted the form it would reload my page.

It went something like this: (file name = "test.asp")
-----------------------------------------------------
<%
'Test for Request.Form(&quot;blnSubmit&quot;) here, and process what
'you want to do next.
%>

<form action=&quot;test.asp&quot; method=&quot;post&quot; name=&quot;frmTest&quot;>
<select name=&quot;cbo1&quot; size=&quot;1&quot; onchange='document.forms.frmTest.submit();'>
<%Call SubToLoadCBO1(Request.Form(&quot;cbo1&quot;))%>
</select>

<select name=&quot;lst1&quot; size=&quot;8&quot; onchange='document.forms.frmTest.submit();'>
<%Call SubToLoadLST1(Request.Form(&quot;cbo1&quot;), Request.Form(&quot;lst1&quot;))%>
</select>

<!-- And So On -->

<input type=&quot;submit&quot; value=&quot;Process Form&quot; onclick='document.forms.frmTest.blnSubmit.value=&quot;True&quot;;'>

<input type=&quot;hidden&quot; name=&quot;blnSubmit&quot; value=&quot;False&quot;>

</form>

------------------------------------------------
(End of example...)

I know it is kind of confusing but that's the way I did it.

Your &quot;SubToLoad...&quot; procedures would read from your data and create your &quot;OPTION&quot; tags for you. Notice that you pass back the old value of the control so that you can re-select it on the control so that the user can see what they selected once the page reloads.

Once you press the real &quot;Submit&quot; button, it updates a hidden field on the form to notify you once the reloads that you need to preform the task you want to do once that button is pressed.

I hope I haven't confused you even more.

-Bill

 
Thank you. I will give that a shot.

Thanks,

Brian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top