Combo Box Compile Error

D

Dinamo/Pistons

See code below

Private Sub Combo30_AfterUpdate()

Me.Child32.RowSource = "SELECT Form FROM" & _
" tableComplaintTypes WHERE ComplaintID = " &
Me.Combo30
Me.Child32 = Me.Child32.ItemData(0)

End Sub

I am getting a compile error for member not found...
I need some fresh eyes to look at this

Thanks
Alex
 
J

John_G via AccessMonster.com

Hi -

I can't see anything - which line is giving you the compile error? Is
child32 a combo box?

John
 
L

Linq Adams via AccessMonster.com

Private Sub Combo30_AfterUpdate()

Me.Child32.RowSource = "SELECT Form FROM" & _
" tableComplaintTypes WHERE ComplaintID = " &
Me.Combo30
Me.Child32 = Me.Child32.ItemData(0)

End Sub

What exactly is ***Form*** here? I assume it's a field name, and the fact
that it's also a Reserved Word in Access is probably confusing the Access
Gnomes! I'd start by changing the field name to something else.

Also, unless the RowSource for Child32 is blank when all of this begins, you
probably need to Requery it after assigning its RowSource .
 
B

Beetle

Child32 is the type of default name that Access would
assign to a Subform Control. A Subform Control does
not have a RowSource property, not does it have an
ItemData property, hence your compile error.

What are you trying to do?
 
D

Dinamo/Pistons

This is a complaint database
There are 5 type of complaints, each type with different prespecs and
different questions
What I am trying to do is after I select the complaint type from a combo box
I am trying to load the corresponding subform with the questions for that
type of complaint

Thanks
Alex
 

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