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


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?


Relevant Pages

  • Re: How to import certain fields from access database?
    ... thanks but i wanted to use the combobox on form so that the user can find the ... "Access a database and insert into a Word document the data that you find ... Doug Robbins - Word MVP ... Dim myActiveRecord As Recordset ...
    (microsoft.public.word.mailmerge.fields)
  • Re: How to import certain fields from access database?
    ... my suggestion of using a combobox was make because it is a more certain way ... "Access a database and insert into a Word document the data that you find ... Doug Robbins - Word MVP ... Dim myActiveRecord As Recordset ...
    (microsoft.public.word.mailmerge.fields)
  • Re: finding data
    ... My question is how do I set up this database so when you open iti you ... In form design view make sure the Toolbox wizard is enabled (magic wand ... This will be the third choice in the first page of the ComboBox ... Rick Brandt, Microsoft Access MVP ...
    (microsoft.public.access.tablesdbdesign)
  • Re: How to import certain fields from access database?
    ... Most probably the Combobox Exit event would be the best, ... Dim myActiveRecord As Recordset ...
    (microsoft.public.word.mailmerge.fields)
  • Re: How to import certain fields from access database?
    ... my suggestion of using a combobox was make because it is a more certain way ... "Access a database and insert into a Word document the data that you find ... Doug Robbins - Word MVP ... Dim myActiveRecord As Recordset ...
    (microsoft.public.word.mailmerge.fields)