PC Review


Reply
Thread Tools Rate Thread

Dynamic Combo's in datasheet (HELP!)

 
 
=?Utf-8?B?bV9iZW50bw==?=
Guest
Posts: n/a
 
      22nd Jun 2005
Hi there,

I'm having a problem with a certain data access methodology that I'm trying
to incorporate into my Access project.

To describe my problem, I'll give an example:

Say you have 3 comboboxes within a datasheet that are bound to fields in a
table. These comboboxes have underlying rowsource queries that rely on each
other to act as filters. ie. combo B requires a value from combo A, and combo
C requires a value from combo B. Therefore, by selecting a value from combo
A, you can populate different values into B, and similarly from B into C.

Once you've selected a value in A, you have to requery B in order to re-run
the underlying rowsource query to poplate B with new values. The same is done
for C when you select a value in B. This works wonderfully when there is only
1 row in the table.

The problem I'm having is that when I move to a new record (record 2) and
start the same process, selecting a value in combo A requeries combo B and,
for some reason, requeries combo B in the FIRST RECORD! Therefore the first
record's combo B changes!!!! I guess this is because of the fact that
logically it's the same combo box, but I need to change the combo's value for
the selected record ONLY!

PLEASE HELP!!! What is wrong with my methodology? These dynamic combo's are
brilliant and I'd really like to use them but only if I can requery the
combo's from the selected record.

Thanks very much!!!

Miguel Bento
IT Consultant
(E-Mail Removed)
 
Reply With Quote
 
 
 
 
Marshall Barton
Guest
Posts: n/a
 
      22nd Jun 2005
m_bento wrote:
>I'm having a problem with a certain data access methodology that I'm trying
>to incorporate into my Access project.
>
>To describe my problem, I'll give an example:
>
>Say you have 3 comboboxes within a datasheet that are bound to fields in a
>table. These comboboxes have underlying rowsource queries that rely on each
>other to act as filters. ie. combo B requires a value from combo A, and combo
>C requires a value from combo B. Therefore, by selecting a value from combo
>A, you can populate different values into B, and similarly from B into C.
>
>Once you've selected a value in A, you have to requery B in order to re-run
>the underlying rowsource query to poplate B with new values. The same is done
>for C when you select a value in B. This works wonderfully when there is only
>1 row in the table.
>
>The problem I'm having is that when I move to a new record (record 2) and
>start the same process, selecting a value in combo A requeries combo B and,
>for some reason, requeries combo B in the FIRST RECORD! Therefore the first
>record's combo B changes!!!! I guess this is because of the fact that
>logically it's the same combo box, but I need to change the combo's value for
>the selected record ONLY!
>
>PLEASE HELP!!! What is wrong with my methodology? These dynamic combo's are
>brilliant and I'd really like to use them but only if I can requery the
>combo's from the selected record.



There is nothing wrong with your method. The problem is
that there is only one combo box value to use in the row
source query for all the other rows/records that are
displayed in sheet (or continuous) view.

Note that you will need to have the same Requery statements
in the form's Current event to make sure that the current
record combo boxes are displaying the appropriate list.

--
Marsh
MVP [MS Access]
 
Reply With Quote
Reply

Thread Tools
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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Combo Box in a Datasheet Form J. Renee Microsoft Access Form Coding 2 4th Dec 2008 04:01 PM
Dynamic row reordering in datasheet =?Utf-8?B?TGVpZg==?= Microsoft Access Form Coding 2 1st Mar 2005 02:21 AM
Displaying dynamic table in datasheet view =?Utf-8?B?RGFycmVuIExhIFBhZHVsYQ==?= Microsoft Access 1 7th Feb 2005 11:59 PM
datasheet form dynamic filter Ren Microsoft Access Forms 1 5th Jun 2004 04:21 PM
Dynamic Crosstab Datasheet Martin Microsoft Access Form Coding 2 6th Aug 2003 02:22 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:16 PM.