Re: How to populate text fields based on drop down list's selection
From: William \(Bill\) Vaughn (billvaRemoveThis_at_nwlink.com)
Date: 03/31/04
- Next message: William \(Bill\) Vaughn: "Re: accessing database problem"
- Previous message: William Ryan eMVP: "Re: How to get a Max and Min from a DataTable"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 31 Mar 2004 11:04:37 -0800
VBG. My book's sample database also deals with authors and applications just
like the one you describe.
Ok, as I understand it you execute a query that returns two columns--the
AUID and the Author. You bind the Author column to the dropdown list and the
user selects one of these authors. The AUID is still stored in the Recordset
you have bound to. Get the index of the currently selected item from the
combobox and use this value to select the corresponding row from the
client-side Recordset. I started writing a sample to illustrate this, but my
VB6 system is hosed and it's not working correctly.
hth
-- ____________________________________ William (Bill) Vaughn Author, Mentor, Consultant Microsoft MVP www.betav.com Please reply only to the newsgroup so that others can benefit. This posting is provided "AS IS" with no warranties, and confers no rights. __________________________________ "Ariadne" <anonymous@discussions.microsoft.com> wrote in message news:48051E8E-4365-489E-98E3-24131A03E8AF@microsoft.com... > I desperately need this syntax for Windows Forms. I've been looking for it for 4 months. I've got a combobox that pulls AuthorID, Author into a dataset from a MSSQL database. Then I set up Author as .DisplayMember. All this works. However, I can't get AuthorID to store anywhere so when the user makes a selection in that combobox, I can't pass the AuthorID over as a parameter to a SPROC so I can populate the next Combobox with book titles that are written by that Author. I'm not using Pubs, this is for a Library catalogue. I subsequently need to pass all the selected IDs back to an insert SPROC so I can add rows to the database. I can do SPROCs, parameters, comboboxes, etc. The one elusive thing about all this is how do I collect those ID fields and actually use them?
- Next message: William \(Bill\) Vaughn: "Re: accessing database problem"
- Previous message: William Ryan eMVP: "Re: How to get a Max and Min from a DataTable"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|