PC Review


Reply
Thread Tools Rate Thread

basing one combo box on another

 
 
=?Utf-8?B?ZGF2ZSBmcm9tIHZpY3Rvcmlh?=
Guest
Posts: n/a
 
      13th Oct 2006
I've managed to get this to work on a stand alone form but I need it as a sub
form on a main form. Whenever I add a record on the sub form (I have three
combo boxes I'm synchronizing), the first record works fine but then when I
tab to the second record (still on the sub form) the second list box is never
populated and the values disappear that I had selected in the first record
for the second and third boxes.
 
Reply With Quote
 
 
 
 
doodle
Guest
Posts: n/a
 
      13th Oct 2006
Change your cycle to current record and use .requery for your combo
boxes on the after update event of the previous combo boxes.


-doodle

dave from victoria wrote:
> I've managed to get this to work on a stand alone form but I need it as a sub
> form on a main form. Whenever I add a record on the sub form (I have three
> combo boxes I'm synchronizing), the first record works fine but then when I
> tab to the second record (still on the sub form) the second list box is never
> populated and the values disappear that I had selected in the first record
> for the second and third boxes.


 
Reply With Quote
 
=?Utf-8?B?ZGF2ZSBmcm9tIHZpY3Rvcmlh?=
Guest
Posts: n/a
 
      16th Oct 2006
I had already used .requery for each of the first two combo boxes and I tried
changing the cycle property for the form to current record but still have the
same result. The entries for the first record I entered in the sub form
(three combo boxes plus the related table key) are saved in the record source
but when I tab to the second record in the sub form the values in the 2nd and
3rd fields disappear from sight (the value in the first field is still
visible). I can then make a selection in the first field of the second
record (i.e. the first combo box) but then the second combo box is empty and
since the field property is set to "limit to list," it won't allow any value
to be added since there is no list. Below is the procedure in the After
Update event for the first combo box:

Private Sub SubjectsAfterUpdate()
Me.SubTopic = Null
Me.SubTopic.Requery
Me.SubTopic = Me.SubTopic.ItemData(0)
End Sub

"doodle" wrote:

> Change your cycle to current record and use .requery for your combo
> boxes on the after update event of the previous combo boxes.
>
>
> -doodle
>
> dave from victoria wrote:
> > I've managed to get this to work on a stand alone form but I need it as a sub
> > form on a main form. Whenever I add a record on the sub form (I have three
> > combo boxes I'm synchronizing), the first record works fine but then when I
> > tab to the second record (still on the sub form) the second list box is never
> > populated and the values disappear that I had selected in the first record
> > for the second and third boxes.

>
>

 
Reply With Quote
 
=?Utf-8?B?ZGF2ZSBmcm9tIHZpY3Rvcmlh?=
Guest
Posts: n/a
 
      16th Oct 2006
I had already used .requery for each of the first two combo boxes and I tried
changing the cycle property for the form to current record but still have the
same result. The entries for the first record I enter in the sub form (three
combo boxes plus the related table key) are saved in the record source. But
when I tab to the second record in the sub form the values in the 2nd and 3rd
fields (first record) disappear from sight although still saved in the record
source (the value in the first field is still visible). I can then make a
selection in the first field of the second record (i.e. the first combo box)
but then the second combo box is empty and since the field property is set to
"limit to list," it won't allow any value to be added since there is no list.
Below is the procedure in the After Update event for the first combo box:

Private Sub SubjectsAfterUpdate()
Me.SubTopic = Null
Me.SubTopic.Requery
Me.SubTopic = Me.SubTopic.ItemData(0)
End Sub


"doodle" wrote:

> Change your cycle to current record and use .requery for your combo
> boxes on the after update event of the previous combo boxes.
>
>
> -doodle
>
> dave from victoria wrote:
> > I've managed to get this to work on a stand alone form but I need it as a sub
> > form on a main form. Whenever I add a record on the sub form (I have three
> > combo boxes I'm synchronizing), the first record works fine but then when I
> > tab to the second record (still on the sub form) the second list box is never
> > populated and the values disappear that I had selected in the first record
> > for the second and third boxes.

>
>

 
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
Basing one combo box on another. Lost Microsoft Access Forms 1 24th Aug 2008 11:33 PM
Basing one Combo Box on another Chucklez Microsoft Access 2 7th Aug 2008 08:10 AM
basing TWO combo boxes on another combo box in a form. =?Utf-8?B?Z2VldmVzMTI5Mw==?= Microsoft Access Forms 6 21st May 2007 02:32 PM
Basing subform combo box on mainform combo box =?Utf-8?B?YXdhY2g=?= Microsoft Access Forms 1 29th Jan 2007 10:11 PM
Basing five combo boxes on one other combo box in an Access forms =?Utf-8?B?Qm9iYmll?= Microsoft Access Forms 1 18th Feb 2006 11:34 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:25 AM.