Results 1 to 7 of 7
  1. #1
    4 Star Lounger
    Join Date
    Sep 2002
    Location
    Stafford, Staffordshire, England
    Posts
    585
    Thanks
    0
    Thanked 0 Times in 0 Posts

    populate a combobox from a query -yet again (2K)

    I have a query that prompts for a criterion which, when supplied, returns the correct records. However, I wish the results of the query to populate a combobox when a value from another combobox is selected. The problem is that my combo is empty after selecting an appropriate value. I've done this loads of times but I cannot see where I'm going wrong. All control names seem OK. Any suggestions?
    <font color=blue><font face="Script MT Bold"><big>Rob</big></font face=script></font color=blue>

  2. #2
    Silver Lounger
    Join Date
    Jun 2002
    Location
    Cheadle, Staffordshire
    Posts
    2,177
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: populate a combobox from a query -yet again (2K)

    Hi bandido.

    populate a combobox when a value from another combobox is selected. The problem is that my combo is empty after selecting an appropriate value

    Did you requery the result combo after selection ?

  3. #3
    4 Star Lounger
    Join Date
    Sep 2002
    Location
    Stafford, Staffordshire, England
    Posts
    585
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: populate a combobox from a query -yet again (2K)

    Hi Dave,
    I''ll run through what I've done then perhaps you can see my error(s).
    Form (frmPupilIncident) contains, among others, 2 combos: TutorGroup and Pupil Name.
    QryTG returns a list of pupils in a given Tutor Group based on selection from TutorGroup combo ([Forms]![frmPupilIncident]![TutorGroup])
    Combo Pupil Name uses field names from query as Row Source
    In After Update event of Pupil Name combo, Pupil Name combo is requeried.
    I hope this helps.
    <font color=blue><font face="Script MT Bold"><big>Rob</big></font face=script></font color=blue>

  4. #4
    Silver Lounger
    Join Date
    Jun 2002
    Location
    Cheadle, Staffordshire
    Posts
    2,177
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: populate a combobox from a query -yet again (2K)

    I can see what you're doing but it's difficult to answer unless I can see whats happening behind the combo's.

    Can you put a single form with just the combo's and any relevant controls, tables, queries and post a demo.
    I'll try and sort it that way.

    Bit cool here in Staffs isn't it

  5. #5
    4 Star Lounger
    Join Date
    Sep 2002
    Location
    Stafford, Staffordshire, England
    Posts
    585
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: populate a combobox from a query -yet again (2K)

    I'll see what I can do a little later but it's a bit big to pare down.
    Not too bad, mid-Staffs.
    <font color=blue><font face="Script MT Bold"><big>Rob</big></font face=script></font color=blue>

  6. #6
    Silver Lounger
    Join Date
    Jun 2002
    Location
    Cheadle, Staffordshire
    Posts
    2,177
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: populate a combobox from a query -yet again (2K)

    <P ID="edit" class=small>(Edited by D Willett on 03-Jul-03 10:23. )</P>In After Update event of Pupil Name combo, Pupil Name combo is requeried.

    This may be a dumb question, but shouldn't Pupil combo be requeried from Tutor Group Combo ?

  7. #7
    4 Star Lounger
    Join Date
    Sep 2002
    Location
    Stafford, Staffordshire, England
    Posts
    585
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: populate a combobox from a query -yet again (2K)

    I didn't make myself clear, sorry. It is actually requeried from Tutor Group Combo. I think I'll reconstruct the Pupil Name Combo to see if that helps.
    <font color=blue><font face="Script MT Bold"><big>Rob</big></font face=script></font color=blue>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •