Requery in a continuous form

P_Henry

Registered User.
Local time
Today, 16:45
Joined
Dec 3, 2003
Messages
63
Hi,

I have scanned through the forum but have not found an answer for the above..

How do I do a requery only for the combo box of a particular record in a continuous form?
To be brief...the user has to select the pimary sector for a project . After, this, I want the next field to show up all sub-sectors based on the value selected in the previous primary sector combo box.

When I do a requery using the following code,

Me.cboDACCode.Requery

all the records in the form get requeried.

All the field are bound field.

There was a similar post in the form but was not complete.

Thanks...PH
 
Is it absolutely nescessary for the form to be continuous? The simpelest sollution would be to make it a single form, showing only a single record.
 
I came across this problem, im only a newbie so I chickened out and made it into a single form.

However for my purposes a continuous one would be better and avoid the confusion.

If there is a way this can be accomplished, it would be nice to know - experts...?
 
Does it mean that this is a limitation of a continuos form??- :confused:
 
The problem arises because Access only maintains a single set of properties for each control on the form. So, even though in form view a continuous/datasheet form shows multiple records, you can see in design view that there is only a single form.

If you search the samples forum, I posted a database that shows a technique for getting around this problem. I don't have a link handy. Just search the samples for posts by me. Make sure to limit your search to the samples section. I have quite a lot of posts here.
 
Pat Hartman said:
If you search the samples forum, I posted a database that shows a technique for getting around this problem. I don't have a link handy. Just search the samples for posts by me. Make sure to limit your search to the samples section. I have quite a lot of posts here.

I tried searching the samples forum but i can't find any of your post. By any chance do you still have the samples? I really need to know how to do it.

Thanks
 
Pat - to save me distecting the fix in your sample. Any chance of giving the highlights on yiur design approach?

John
 
One of the forms is designed to show visually how the "fix" works. The fix employs two controls. A bound textbox on top of a bound combo. The textbox covers all the combo except for the drop arrow.

The problem of the disappearing value is caused because although the ControlSource of the combo is bound to a field in your table, the displayed field is actually coming from the combo's RowSource. So as you change the RowSource when you "cascade" the combo, the previously visible value may disappear. The sample uses states and cities. So, you choose Connecticut and then Hartford from the list of CT cities. If for the next row, you choose New York, Hartford mysteriously disappears from the previous row. That's because Hartford isn't in New York which is how the combo is currently filtered. The bound textbox, contains the value "Hartford" because the form's RecordSource is a query that joins the main table to the lookup table.
 
Hi Pat,

Your posts on this problem are very helpful as I am experiencing a similar problem with my cascading combo boxes. However, I think this fix creates another problem for me.

Please refer to my post located at:
http://www.access-programmers.co.uk/forums/showthread.php?t=101001
There is also a diagram of the database relationships attached to the post noted above.

Just as I cannot get the parent/child links between the main form and subfrom to work properly when I link the Lessons table into the subform, I have the same problem when linking in the dancenames table and the songs table to PlanProgramDetails within the subform. Unfortunately, I think I need to pull these two tables in so the textboxes which cover the cascading combo boxes have words in them instead of just the primary key record numbers so that the information makes sense to the user. So, do I really need to link these 2 tables in or do I have something set up incorrectly in my tables or overall design? And, how do I get the linking field between the main form and subform to work right when there's more than one table underlying the subform?

Thank-you,
Heather
 

Users who are viewing this thread

Back
Top Bottom