Problem with refreshing (at least seems to be one)

  • Thread starter Thread starter jimmor
  • Start date Start date
J

jimmor

Guest
Hello everyone!
I made a form with two combo-boxes. First is connected to table with data on Music Groups second to one with data on Songs. I wanted to make the second Combo show only Songs of the Music Group selected in 1st Combo Box.

I made appropriate tables and quaries (at least I hope so). And the result is that options in Combo 2 change only after leaving and reopening the form. I tried to fix it with creating 'refresh' button (refreshing the form) and even 'save' button. Neither helped.

Does anyone has a solution? Perheaps puting 2nd Combo in a subform would help? Please help me...
 
Jimmor,

Use the AfterUpdate of the first combo to do:

Me.SecondCombo.Requery

I assume that the second combo is populated by a query that
uses the value of the first combo.

Wayne
 
Thanks Wayne, it works :D

I have a new question:

Is it possible to put queries results in fields of an action in macro? (Like Item and Expresion fields of SetValue ?) I wanted to manipulate layout of a form showing some fields and hiding others depending on options chosen by user (options in the same form).

Example:
a form asking for Colour definition:
[Combi1] - populated by 'RGB', 'CMYK', 'Grayscale'

If user choses 'RGB' then Text boxes
[Red]
[Green]
[Bleu]
Should be despleyed

If user choses 'CMYK'
[Cyan]
[Margenta]
[Yellow]
[blacK]

'Greyscale'
[blacK]

It seems for me best if form optional layouts could be placed in a table. Does it make any sense at all?

Jimmor
 
Jimmor,

I have a form where I use fields but don't want the users to see them and I set the [Form]![FormName]![Field].visible = True or False depending if I want the user to see it. Since you have three different layouts, using this with an Nesting If Stmt as to what your user picks for COMBI1 to be equal to might work work for you.
 

Users who are viewing this thread

Back
Top Bottom