Requery problem with combos on a continuous subform

C

Chris

Hi There,
I have posted an earlier post today, far too complicated by the looks of it,
so I have re-written a simplified version.
I am new to this and I really need some help, I have looked and read lots of
posts, but I still cannot get it!
I have 3 dependent cascading combo boxes in a subform, which is also
continuous.

I can select data from the first combo box, but the
second combo box which depends from the first is blank, the third combo box
which depends on the second combo is showing data but there is no selection
to it, just the whole list.

Combo 1: CboInjuryID based on TblInjuries:
InjuryID: AutoNumber, PK
InjuryName

Combo 2: CboMBodyPartID based on TblMainBodyParts:
MbodyPartID: AutoNumber: PK
MbodyPart: Text
InjuryID

Combo 3: CboBodyPartID based on TblBodyParts:
BodyPartID: AutoNumber: PK
MbodyPartID

What I am trying to reach is to have the combo boxes working on a continuous
form and finally to connect this subform to the main form.
I have been trying for days to no avail and I am feeling very confused now.
Any help would be greatly appreciated!
Chris.
 
B

Barb

Hi Chris
I would base your second combo box on a query where InjuryID would equal the
value in your first combo box. Then depending on the whole structure I would
probably follow the same logic to the third combo box.
In your second combo box properties go to data, Row source - right click and
build. This will take you to a query builder. Then in conditions part for
your InjuryID - right click and build so it equals your first combo box value.

Barb
 
C

Chris

Hi Barb,
Thank you for your time, I have this in the second combo query builder:
Like [forms]![frmSubInjury]![cboInjuryIDSub]

The form is working fine as a Single form, but as soon as I change it to
Continuous, the problems start: the second combo of the first line seems to
loose its data. I also do not know how to have the subform and main form
working together other than having the PK as the linking field.
Thanks again,
Chris.
 
B

Barb

Hi Chris
I'm not that familiar with continuous forms, but just a couple of things I'd
look into.
Are your combo boxes in a header or detail section of the subform. Maybe
your combo boxes shoud be on your main form and your subform shuld display
only the final results. I think the most practical way of wieving information
is a main form with filters (combo boxes), requery after update or a button -
and subform as datasheet ( with additional subdatasheets if needed). Sorry,
but it just seems like you're building something more difficult than it needs
to be.

Barb

Chris said:
Hi Barb,
Thank you for your time, I have this in the second combo query builder:
Like [forms]![frmSubInjury]![cboInjuryIDSub]

The form is working fine as a Single form, but as soon as I change it to
Continuous, the problems start: the second combo of the first line seems to
loose its data. I also do not know how to have the subform and main form
working together other than having the PK as the linking field.
Thanks again,
Chris.

Barb said:
Hi Chris
I would base your second combo box on a query where InjuryID would equal the
value in your first combo box. Then depending on the whole structure I would
probably follow the same logic to the third combo box.
In your second combo box properties go to data, Row source - right click and
build. This will take you to a query builder. Then in conditions part for
your InjuryID - right click and build so it equals your first combo box value.

Barb
 
C

Chris

Hi Barb,
Thank you for your reply. Unfortunately I cannot pu the first combo onto the
main, as all fields from the subform are part of a junction table, hence the
main form and subform layout. I will certainly will have a look at the
headers and details section, mifgt have missed something there.
Thanks a lot.

Barb said:
Hi Chris
I'm not that familiar with continuous forms, but just a couple of things I'd
look into.
Are your combo boxes in a header or detail section of the subform. Maybe
your combo boxes shoud be on your main form and your subform shuld display
only the final results. I think the most practical way of wieving information
is a main form with filters (combo boxes), requery after update or a button -
and subform as datasheet ( with additional subdatasheets if needed). Sorry,
but it just seems like you're building something more difficult than it needs
to be.

Barb

Chris said:
Hi Barb,
Thank you for your time, I have this in the second combo query builder:
Like [forms]![frmSubInjury]![cboInjuryIDSub]

The form is working fine as a Single form, but as soon as I change it to
Continuous, the problems start: the second combo of the first line seems to
loose its data. I also do not know how to have the subform and main form
working together other than having the PK as the linking field.
Thanks again,
Chris.

Barb said:
Hi Chris
I would base your second combo box on a query where InjuryID would equal the
value in your first combo box. Then depending on the whole structure I would
probably follow the same logic to the third combo box.
In your second combo box properties go to data, Row source - right click and
build. This will take you to a query builder. Then in conditions part for
your InjuryID - right click and build so it equals your first combo box value.

Barb

:

Hi There,
I have posted an earlier post today, far too complicated by the looks of it,
so I have re-written a simplified version.
I am new to this and I really need some help, I have looked and read lots of
posts, but I still cannot get it!
I have 3 dependent cascading combo boxes in a subform, which is also
continuous.

I can select data from the first combo box, but the
second combo box which depends from the first is blank, the third combo box
which depends on the second combo is showing data but there is no selection
to it, just the whole list.

Combo 1: CboInjuryID based on TblInjuries:
InjuryID: AutoNumber, PK
InjuryName

Combo 2: CboMBodyPartID based on TblMainBodyParts:
MbodyPartID: AutoNumber: PK
MbodyPart: Text
InjuryID

Combo 3: CboBodyPartID based on TblBodyParts:
BodyPartID: AutoNumber: PK
MbodyPartID

What I am trying to reach is to have the combo boxes working on a continuous
form and finally to connect this subform to the main form.
I have been trying for days to no avail and I am feeling very confused now.
Any help would be greatly appreciated!
Chris.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top